Posts by Thiago Friedman • 1,035 points
48 posts
-
1
votes1
answer931
viewsQ: SMTP Error: The following Recipients failed from Hotmail to enterprise
I have a form in html that the user will enter the name, email, subject and message, considering that the user will be able to type email from Hotmail, gmail, etc..., and when you confirm I am using…
-
0
votes1
answer225
viewsQ: Responsive embed bootstrap does not work
I am trying to implement the embeded Responsive of bootstrap, because I need to put a video (.mov) on the site, but it is not working. source: http://getbootstrap.com/components/#Responsive-embed…
-
0
votes1
answer51
viewsA: Problems with Folderbrowserdialog. Application hangs
try to add in the references: using System.Windows.Forms; and then instantiate in the following manner: DialogResult result = new DialogResult(); if (result == DialogResult.OK) path_destino =…
c#answered Thiago Friedman 1,035 -
2
votes1
answer114
viewsA: Sublime Text - How to ignore the acquisitions sought by the shortcut (Goto Anything) CTRL+P?
You will need to add the following to your user settings (Preferences -> Settings - User) with any other directories or file types that you want to ignore. Example: "folder_exclude_patterns":…
-
3
votes1
answer104
viewsA: Methods to test Spring application are not found
Try to exchange imports for these, in this order: import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired;…
-
1
votes1
answer167
viewsA: Change transition and location of an action in jQuery
I believe that’s what you want: https://jsfiddle.net/cm5ko9jf/2/
-
0
votes2
answers3935
viewsA: Grab user id by SESSION
Try this way using session_id() <?php session_start(); $r=session_id(); echo "o id da sessão é: ".$r; ?>
-
1
votes6
answers498
viewsA: What is the safe way to define a default value for a function parameter?
The default parameters of a function allow regular parameters to be initialized with initial values if Undefined or no value is passed. Syntax function [nome]([param1[ = valorPredefinido1 ][, ...,…
-
2
votes1
answer32
viewsA: disable select in cakephp
Try it this way: <?= $this->Form->input('compra', array('class' => 'form-control', 'placeholder' => 'Filtre pelo número da compra', 'value' => @$_GET['data']['compra'], 'onchange'…
-
1
votes2
answers759
viewsA: Add a 'Pointer' arrow in Tooltip effect
Simply change this a.tooltip css property: a.tooltip { cursor: pointer; } example: http://jsfiddle.net/ehg8vkj3/ If this is not what you want, please comment before negative.…
-
0
votes4
answers231
viewsA: Jquery find in tree
you can do it this way: $(".pai").children().children(".filho");
-
4
votes2
answers60
viewsA: Navigation problem using Button in Bootstrap
Try this way: <a href="/Terezinha.Bandeira"> <button type="button" class="btn btn-primary btn-lg">Large button</button> </a>
-
0
votes2
answers87
viewsA: Slide in jquery with div, containing image and content
I tried to do something close to what you want, I could take a look: http://jsfiddle.net/6atm8opz/3/ in case you need anything else, inform in the comment.…
-
9
votes6
answers34111
viewsA: What is and what is an abstract class for?
Abstract classes serve as "models" for other classes that inherit from them, and cannot be instantiated by themselves. To have an object of an abstract class it is necessary to create a more…
-
1
votes1
answer445
viewsA: Mark Jcalendar when there is an event on the day
I believe you can use setBackground, follow an example: Calendar cal = Calendar.getInstance(); cal.setTime(calendar.getDate()); int day = cal.get(Calendar.DAY_OF_MONTH); int month =…
-
3
votes3
answers1861
viewsA: C# MVC Run Function (Logout) When Closing Browser
Add to your script: window.onbeforeunload = function () { return "Você realmente deseja fechar?"; };
-
2
votes3
answers1426
viewsA: How to take data from a tag and calculate?
Basically you can make hidden fields with the desired variables, so I realized you need the price of the product and the value of the discount, so it would look like this: <input type="hidden"…
-
5
votes2
answers3041
viewsA: How to separate the characters of a string in R?
Try it that way: unlist(strsplit("01/01/2000", "[/]")) or > strsplit("01/01/2000", "/")
-
4
votes4
answers1166
viewsA: How to sort the data of a query by predefined values?
Would be like this, if you have Acre and Alagoas, will order by the same, if you have neither of the two will order by Amazon : SELECT * FROM usuarios JOIN estados.id = usuarios.estado_id ORDER BY…
-
0
votes2
answers230
viewsA: Jquery find input containing specific text
You can do it this way: $(":checkbox").filter(function() { return this.value == '5'; }).prop("checked","true"); or $("input[type=checkbox][value=5]").prop("checked",true); DEMO:…
jqueryanswered Thiago Friedman 1,035 -
0
votes1
answer177
viewsA: Data comparison between Datagrid and database
I think you do not need to do this check, I believe it is much simpler to cancel and update the datasource of your dataGridView, as follows: dataGridView.DataSource = null; dataGridView.Update();…
c#answered Thiago Friedman 1,035 -
0
votes3
answers163
viewsA: Viewdata is not displaying message
Try this way: <p> <%: ViewData["FeedBack"] %> </p> but in this way: <p> <%= ViewData["FeedBack"] %> </p>…
-
0
votes2
answers758
viewsA: Certain function does not work in Firefox
This error occurs when the function has not been declared before loading the page, try to include Rules.js file in your View: <script src="../10000/rules.js"></script> or declare the…
-
1
votes2
answers877
viewsA: How to create field dynamically with jQuery?
Here is a ready-made jsFiddle example: http://jsfiddle.net/kro8mud9/1/ $(document).ready(function(){ var counter = 2; $("#addButton").click(function () { if(counter>10){ alert("Only 10 textboxes…
-
2
votes1
answer1327
viewsA: How to view an Alert from the Asp.net mvc controller
You can return an alert: return JavaScript("<script>alert(\"método CarregarGrid()\")</script>");
asp.net-mvcanswered Thiago Friedman 1,035 -
1
votes1
answer114
viewsA: Key Frame CSS3 - Logo
I did some research and I believe that the best way for you to do it would be with this event: http://api.jquery.com/animate/ Only problem is I didn’t get the selector from each div, but the logic…
-
2
votes1
answer928
viewsA: How to show table in return JSON?
Try this, it’s to work if the name of the div is correct and the page too: $("#resultado-upload").load('pListaUpload.php',{'IdContrato' : IdContrato}); Maybe if it doesn’t work try to make ajax…
-
15
votes3
answers11643
viewsA: How to convert code block into single line?
CTRL + To to select the code block and then CTRL + J to join the lines. The option of joining the lines is also available, through the menu: Edit>Line Operations>Join lines…
-
2
votes5
answers3537
viewsA: Make div disappear
To make invisible/hide the div you can do so: $("#panel").hide() ou $("#panel").css("display", "none") The problem is if you are doing some validation to check if the div is visible:…
-
2
votes1
answer111
viewsA: Actionresult Asp.net MVC methods
Yes, it will work, just you pass correctly in the name of the view: public ActionResult GoToView() { return View("frmProdutos"); }
asp.net-mvcanswered Thiago Friedman 1,035 -
1
votes1
answer167
viewsA: Deploy Windowsforms with bank . mdf
In the Generator.mdf file properties, select "Copy to Output Directory" or "Copy Always" for the file to always be copied to the output directory or "Copy if newer" to copy only if the file is newer…
-
4
votes2
answers321
viewsA: Script to make a div appear
After clicking register, you have some ways to show the div: 1st -> $("#idDiv").show(); 2nd -> document.getElementById('idDiv').style.display = 'block'; 3rd -> $("#idDiv").css("display",…
-
1
votes1
answer1662
viewsA: Floating point result for decimal variable
Only place m to represent decimal, this way without m, is an integer, disregarding the decimal places. result = (1m / 2m) * (-1m);
c#answered Thiago Friedman 1,035 -
0
votes4
answers590
viewsA: Interaction between forms?
So Bruno, apparently you’re cleaning the Form2 Controls, I believe that’s what’s leaving the form blank, and you don’t need to instantiate the form again because when you click the button this is…
-
-1
votes1
answer92
viewsQ: How to set the values of a Propertyinfo of the instantiated classes within a class?
I am doing a generic method for rounding values of a class(T), but I also have the classes within this principal(T), these classes I can set in this way: IEnumerable<PropertyInfo>…
-
0
votes5
answers2046
viewsA: Compressing PDF files
Really without using itextSharp will be complicated, there is another library NPOI.XWPF.Usermodel, maybe this code can help you, in this example the code actually decreases the pages size,…
-
0
votes1
answer5831
viewsA: Referenceerror: google is not defined
You cannot use the Google Maps Javascript API until it is loaded. Your creation is running the marker before the API is loaded. You need to move it to the initialize function, which will not run…
-
2
votes2
answers460
viewsA: Problems with Selectedindexchanged Asp.net C#
Well strange guy, it was supposed to work, if the generated of your file correctly generated the assignment of the event to your dropdownlist, but beauty, to ensure that your method is called, try…
-
0
votes3
answers1096
viewsA: Pass Viewbag to _Layout
I think it’s kind of like what you want: List<SelectListItem> listItem = new List<SelectListItem>(); List<SeuModel> listModel = repositorio.BuscarDados(); foreach(var item in…
-
3
votes1
answer336
viewsA: How to perform a HQL query in C#?
Guy would look something like this: IList<int> GetListYear(Guid educationalInstitutionId, Guid academicLevelId, Guid? locationId, Guid? programOfferedId) { StringBuilder hql = new…
-
0
votes2
answers946
viewsA: How to resize images before upload using c#Asp.net
I believe that this can solve: http://www.codeproject.com/Articles/23011/Simple-Image-Resizing-Library and a component that resizes images: http://imageresizing.net/docs/basics…
-
1
votes2
answers622
viewsA: Component for HTML text formatting
I believe this component can help you: https://www.componentsource.com/product/aspose-email-for-net and also has this html editor for windows form: http://www.modeltext.com/html/…
-
0
votes1
answer96
viewsA: The Member with Identity 'Faseprojeto_fase_target' does not exist in the Metadata Collection
Could debug and tell which line exactly gives the error rs, I believe something is with the incorrect name in your mapping or is not correctly filling the entity, check again in this part of your…
-
-1
votes1
answer657
viewsA: Select Rows from a Datagrid and send to an Array
Make a column on the Hidden type grid with the checkbox, and when selecting, add it to a list in your controller. Maybe this link can help you:…
-
-1
votes1
answer177
viewsA: How to disable default value in Kendo dropdownlist?
Try to use the event dataBound in your dropdownlist to leave selected the value that comes from the grid. Maybe in this link you can help:…
-
0
votes1
answer126
viewsA: When I close the Form executes the Leave event
change your if condition to only maskCnpj.Text != "" , there is no need to check the characters if you will make the mask later, and it seems that the function of Focus() is persisting the message,…
c#answered Thiago Friedman 1,035 -
0
votes3
answers220
viewsA: Return in a view-specific div
Take the id of div that the fields have been validated and put in this command: $('html, body').animate({ scrollTop: $('#IdDiv').offset().top }, 'slow');…
-
0
votes2
answers2725
viewsA: Error: String not recognized as valid datetime
First of all, the Preview property should be of the Datetime type, right. According that the conversion you do is correct, but you need to see if any value comes Reset["Previsaostart date"], what I…