Posts by Cassio Alves • 1,033 points
65 posts
-
0
votes1
answer33
viewsA: Access Tag via beautifulsoup
Just get the class sale price and pick up your content # -*- coding: utf-8 -*- from bs4 import BeautifulSoup data = """<span id="ctl00_Conteudo_ctl01_spanPrecoPor" class="for"> <span…
-
2
votes2
answers1229
viewsA: Catch tags within tags in Beautifulsoup
Just fetch the tag h3 and then fetch the element a: from bs4 import BeautifulSoup data = """<a href="https://g1.globo.com">Globo</a> <h3 class="b"> <a…
-
1
votes4
answers197
viewsA: Remove comment tag and your content in Beautifulsoup 4
If you only want the content of div foo: div = soup.find('div', class_='foo') print div.text Upshot The Macaw is a flying animal.…
-
0
votes1
answer113
viewsA: How to re-order a Viewbag, inside the View?
You must clean up your ComboBox and place the ordered items after this Clear Combobox $("#IdDaSuaComboBox").empty(); Add new items $.each(resposta, function (i, obj) {…
-
0
votes1
answer606
viewsA: Pass id value to from one view to another - Asp.Net MVC
Just pass the article id when clicking evaluate: @Html.ActionLink("Avaliar", "NomeAction", "NomeController", new { id = item.id}) Action Avaliar In your action Evaluate you will receive the id of…
-
0
votes2
answers684
viewsA: Pass JSON.stringify to Controller
You are missing in two points, in the name of some attributes and in their type, for example you are sending in your JSON vICMS, but in your model this ICMS, and in the case of all attributes float…
-
0
votes1
answer88
viewsA: Pass-through id to another Ionic 3 page (Restful API with php)
You did almost everything right, just passed the wrong id in setRoot, the right would be: public doSearch(id_comodo) { this.nav.setRoot(TripsPage, {id: id_comodo}); }…
-
1
votes1
answer23
viewsA: Tab does not change when I switch pages
Pass the index of the tab you will change as parameter: this.navCtrl.setPages([{page: AboutPage, tabIndex: 2}]); From the destination, take the parameter tabIndex and change the tab:…
-
0
votes3
answers135
viewsA: MVC: parameter in URL is not being passed to controller
Make sure your default route is configured: routes.MapRoute("default", "{controller=Home}/{action=Index}/{id?}"); and change your link to this, using the attribute asp-route-: <a…
-
0
votes2
answers172
viewsA: Scroll Element of the WPF C#Datagrid class
At your event ScrollChanged, you can use the code below: int AlturaTotal = 0; foreach (DataGridViewRow row in grid.Rows){ AlturaTotal += row.Height; } if (AlturaTotal - grid.Height <…
-
1
votes2
answers673
viewsA: ion-input only ionic3 bounded numbers
Do so on your ion-input: <ion-input type="tel" pattern="[0-9]*"></ion-input> Works in the: iOS 9/10+ Android 5+
-
1
votes1
answer431
viewsA: uninstall Ionic projects
There is no command for this, you must do in hand: Windows: rmdir "nome da pasta" Linux: rm -rf nomedapasta
-
1
votes2
answers661
viewsA: Back to previous page - mvc page Razor
The RedirectToAction expects as argument a string with the name of the controller to which you want to redirect, as this blank, it redirects to the controller of the current method. Then you should…
-
0
votes1
answer38
viewsA: Prevent Refresh on the page from generating additional queries to the BD MVC C#
When you do the search for the first time, store it in a Session or Viewbag, something that says that the search has already been done, then when the user updates the page, you can check the Reload…
-
0
votes2
answers31
viewsA: Compare shorter term between Asp.net columns
As lstDeposito has the warehouses, you can sort and pick up the last record: var armazen = lstDeposito.OrderByDescending(x => x.Prazo).Take(1); int menorprazo = armazen.prazo;…
-
1
votes2
answers45
viewsA: Re-registration in the Database
As you have the product Id, just search for this product within the same update method, until there is already a method for this that is the find: ProdutoRepositorio app = new ProdutoRepositorio();…
c#answered Cassio Alves 1,033 -
0
votes1
answer246
viewsA: href with Submit on Asp.net core MVC
As you just want to quit the system, there is no need for a Ubmit, just put the href pointing to your method, example: View <a href="~/Login/Logout" role="menuitem"> <i class="icon…
-
1
votes1
answer928
viewsA: ASP . NET MVC - Windows Authentication - Browser Authentication Form
Since you don’t need a login screen, just create an ASP.NET MVC project and change the authentication type, to Windows Authentication: When you run the Code, you will have the domain/user through…
-
0
votes2
answers241
viewsA: Validation in Edit and Delete operations by ID at url
I advise you not to waste time trying to make the security of your application trying to change the route or something like, thinking of a simplistic security, you can use the Filter of ASP.NET:…
-
0
votes1
answer698
viewsA: Error inserting data in postgree: column "test" does not exist
Based on your review, just put the product name in quotation marks: var sql = 'insert into fornecedores values (' + req.body.codigo + ',\'' + req.body.nome + '\', '+ req.body.idade + ',\'' +…
-
0
votes2
answers411
viewsA: How to display JS objects in view
You yourself answered your question at the end rs, just use *ngFor: <ion-list> <ion-item *ngFor="let item of objetoChamadoSelecionado"> <div ><p>{{ item.numero…
-
0
votes1
answer1020
viewsA: The parameter dictionary contains a null entry
Pass id value without quotation marks: data: {"id": 1}, and note down its function: [HttpPost] public string PostLinear(int id){
-
0
votes2
answers151
viewsA: How do I use two checkboxes in a C# mvc view to choose the query type?
How you need to search by code OR address, you will need to use Radiobox or Combobox: Radiobox Codigo: @Html.RadioButton("Pesquisa","Codigo") Endereco: @Html.RadioButton("Pesquisa","Endereco")…
-
2
votes1
answer448
viewsA: How do I profile security with Asp.Net MVC?
Thinking of a very simple solution you could use the Filter of ASP.NET. Database You can have 3 tables, one of users, another of profile, and another user profile. Controller You will annotate your…
-
1
votes1
answer388
viewsA: Consume REST IONIC3
If you look at the error calmly you will see that Ngfor is trying to iterate over an object 'Leanne Graham' that there is no support and that is the name attribute returned by the API. As you are…
-
0
votes1
answer1006
viewsA: Bootstrap Modal Change and Ajax ASP.NET?
You must close the modal at the end of the whole process, at the click of the button. Modal of product edition <script> $("#btnSave").click(function () { $.ajax({ type: "POST", url: "", data:…
-
2
votes1
answer59
viewsA: After Login, how to pass value to the view
I would change the following; Loginviewmodel public int Cod_Cliente { get; set; } Controller ViewBag.CodigoUser = model.Cod_Cliente; View…
-
2
votes1
answer431
viewsA: Kendo Textboxfor allow only numbers in . NET
Put the type = "number" in the TextBoxFor @(Html.Kendo().TextBoxFor(model => model.MinVoltage).Name("MinVoltage").HtmlAttributes(new { type = "number", style = "width:…
-
1
votes1
answer592
viewsA: Swap background color and item text in Gridview
Use the event dataGridNumbers_CellClick private void dataGridNumbers_CellClick(object sender, DataGridViewCellEventArgs e) { dataGridView1.Rows[e.RowIndex].DefaultCellStyle.BackColor =…
-
0
votes3
answers160
viewsA: Problem mapping entities related to Fluent API
Change your Timefootball class to: public class TimeFutebol { public TimeFutebol() { Usuarios = new List<Usuario>(); } public int TimeFutebolId { get; set; } public string TimeFutebolNome {…
-
3
votes1
answer75
viewsA: I want to search information of a table with EF
You can use a Viewmodel: public class ViewModel1 { public Tabela1 tabela1 { get; set; } public Tabela2 tabela2 { get; set; } } Action: public ActionResult Index() { var viewModel = new ViewModel1();…
-
1
votes2
answers659
viewsA: What is the print(' a') function in python
Use: print("\a") # Python 3 or print "\a" # Python 2 or Bash Shell: echo $'\a' Obs: on some terminals the campaign may be disabled.…
python-3.xanswered Cassio Alves 1,033 -
1
votes4
answers488
viewsA: How to treat this Nullreferenceexception
The variable pessoaJuridica was not instantiated Instate: var pessoaJuridica = new PessoaJuridica(); If you want to assign: var pessoaJuridica = p; Enter attributes in your class constructor: public…
-
0
votes1
answer892
viewsA: How to use a Hotmail/outlook account to send email in c#
This code suits me well: MailMessage mail = new MailMessage("remetente", "destinatario"); SmtpClient client = new SmtpClient(); client.EnableSsl = true; client.Host = "smtp-mail.outlook.com";…
-
-1
votes3
answers221
viewsA: Error in "switch case"
The error occurs because the break is missing in this part of code: case 2:{ biblioteca.menuEditar(opc); break; }
-
1
votes1
answer100
viewsA: Icollection in Put Webapi method
I think you should change your relationship to: Person class pessoa { public pessoa() { pessoa_endereco = new List<pessoa_endereco>(); } public string codigo { get; set; } public string nome {…
-
2
votes2
answers75
viewsA: How to make an if in a select when creating an object?
Use like this: listaAgendaDetalhe = (from a in listaAgenda join p in listaProfissional on a.idProfissional equals p.id select new agendaDetalhe() { ativo = p.ativo, dataIni = a.dataIni,…
-
5
votes2
answers591
viewsA: In a Textbox, with the property Multiline true, character n does not change line
Use the Environment.NewLine, which returns a specific string from the platform in question: "\r n" ( u000D u000A) for Windows "\n" ( u000A) for Unix Example: textBox1.Text = "IMPRIMEEMCIMA" +…
c#answered Cassio Alves 1,033 -
0
votes3
answers55
viewsA: Automatic punctuation in the lines of a Multiline Textbox
To ensure that there will be the ";" I would do the following:: Texto.replace(";", "").replace("\n", ";\n"); And for the "." I would do: Texto.replace(".", ""); Texto.Insert(Texto.Length, ".")…
-
1
votes1
answer798
viewsA: How to bring information by clicking on the dataGridView C#, and adding values from a column
Just use the event Cellclick or Cellcontentclick or any other click event. private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { int Total = 0; var Row =…
-
6
votes1
answer8506
viewsA: Soccer Games Results on the site
I don’t know a service that provides all this information for free. But there are some free Apis that can help you: Gratuitous: http://www.futebits.com.br/ws/api/ http://apifutebol.footstats.com.br/…
-
2
votes2
answers2570
viewsA: IIS lists directory instead of opening page
Remove the line: <directoryBrowse enabled="true" /> Or false.
-
1
votes1
answer2036
viewsA: Pass parameters to the controller via ajax
Just pass the ID on the date: data: { "id": id}, In your Controller: [HttpPost] public ActionResult GetID(int id){ }…
-
1
votes1
answer50
viewsA: What a good practice for using Modelbinders in MVC
In this case would be: @Html.DropDownListFor(c => c.Perfil, new SelectList(SEU MODEL, "ID", "Nome"), "Selecione o Perfil")
-
0
votes2
answers901
viewsA: How not to allow the user to access the previous login/registration page after logging in or registering
Use the Actionfilterattribute First create a Loginfiltro class (for example): public class LoginFiltro : ActionFilterAttribute { public override void OnActionExecuting(ActionExecutingContext…
-
1
votes1
answer99
viewsA: issue of multiple choices in APS MVC 5
To return only one information, use: public ActionResult Index() { return View(db.Questoes.FirstOrDefault()); } That will return you only a record Or use Where to return something specific public…
-
1
votes1
answer181
viewsA: Insert in 2 tables Entity framwork - 1 to 1
In this case you just fill the user object, and set the user object’s person property with the person object of the parameter, and then just save. // POST: api/pessoas [ResponseType(typeof(pessoa))]…
-
3
votes1
answer44
viewsA: Verifying existence of shortcut
What is wrong is the .Lnk file name - this is duplicated. Create the shortcut again by placing only "Stock Box - Stock Management". Then Windows itself will create a . lnk. Or rename the file and…
-
2
votes2
answers1886
viewsA: Assembly Microsoft.Owin not found
Reinstall a newer version of Microsoft.Owin, this version is from and January 2014. Install version 3.0.1. Update-Package Microsoft.Owin Obs: Sometimes go into Import and Export Settings, and give a…
-
1
votes1
answer241
viewsA: Rollback transaction does not work as expected
This missing to give the Commit in the Inserts function after the line: command.ExecuteNonQuery Because without the commit, there’s nothing to "Reverse" with Rollback.…