Posts by Marcos Brinner • 1,282 points
97 posts
-
0
votes1
answer416
viewsA: How do I set up a Mysql database that is on my machine to be accessed on the web-hosted Moodle?
First you will need a static IP or Dynamic DNS to access your website, and you will also need the ports of your IP to be released on your internet provider, without this there is no way you can make…
-
0
votes1
answer31
viewsA: Pass php variable by javascript and then pick up php via post
very simple print your variable inside the script passing as parameter $_GET See the example below <script> function carregar(pagina){ $("#conteudo").load(pagina+"?pegaAqui=<?php echo…
-
1
votes1
answer231
viewsA: How to get first value returned by foreach
check if the key is the first key if yes mark checked otherwise do not mark @foreach($property_get->getPhotoGroupList() as $key => $grupo) <input id="tab{{ $key }}" type="radio" name="tabs"…
-
0
votes3
answers70
viewsA: Non-responsive image
try this code There is background-size property: cover; That makes the background fill the full size of the element background-image: url("../assetsimages/book.jpg"); background-position:center…
-
0
votes2
answers193
viewsA: Find string in html code
C# is a programming language that runs on the server side much more able to read and write files, has no ability to make changes on the client side, to read files in C# can use the library…
-
2
votes3
answers2992
viewsA: How to convert HTML to JSON?
Inside this file has a Json Encoded String You can generate by php using the json_encode(); and can convert Arrays and Bank Returns <?php $arr = array("MG"=>"http://site.com","SP" =>…
-
1
votes2
answers1162
viewsA: How to put a java script into value html
Set an id for your html element <input type="text" id="idUnico"> <script> var variavel = x; document.getElementById("idUnico").value = variavel; </script> If you are using jquery…
-
1
votes2
answers996
viewsA: Error in PHP 7: Call to Undefined Function sql_regcase
is a function that was deprecated (became obsolete) many years ago but you can generate something function my_Sql_regcase($str){ $res = ""; $chars = str_split($str); foreach($chars as $char){…
phpanswered Marcos Brinner 1,282 -
1
votes2
answers158
viewsA: Get the name of the wifi connected in C#
First you have to create a Wlanclient Object wlan = new WlanClient(); There you can get a list of SSIDS that the pc is connected with that code: Collection<String> connectedSsids = new…
c#answered Marcos Brinner 1,282 -
0
votes1
answer188
viewsA: CSS Bootstrap in Ajax combobox
Well your bootstrap css must be being interfered by some external element try the following <div class="grid-6"> <div style='float:left;marin-top:15px'> <asp:Label ID="labelModality"…
-
0
votes1
answer32
viewsA: Control of Radios Input
From what I understand you want a function to "group" all inputs by name and count them Use the following code $(function () { $("#botao").click(function () { var inputs = $(":radio"); var grupos =…
-
0
votes1
answer72
viewsA: Convert value of a select options component to number
Use the parseInt() <script> var meuNumber = parseInt($(".form-control").val()); </script>
-
0
votes1
answer51
viewsA: Error when publishing a website developed in Asp.Net MVC
The error was specific in determining to disable the error costumn by setting the value to off <customErrors mode="Off"/> This will make you see what the real mistake is happening in your…
asp.net-mvcanswered Marcos Brinner 1,282 -
0
votes3
answers399
viewsA: Capture Form - More Correct Way
Well I especially prefer to use Jquery because it is more "easy" and more "visually clean" but as you are using pure javascript here goes <form name="login"> <input type="text" value=""…
-
1
votes1
answer60
viewsA: Generate image using PHP for directory
Here’s an example of what you want to do Good you can create a function Suppose you are receiving your upload data via $_POST function QualImagemUsar(){ if(isset($_POST['variaveldaImage']){…
-
0
votes1
answer433
viewsQ: WPF select all Datagrid Checkbox
Hello, I’m trying to select all Checkbox of a datagrid but I’m not succeeding. Below is my code to select: private void CheckUnCheckAll(object sender, RoutedEventArgs e) { CheckBox chkSelectAll =…
-
0
votes1
answer214
viewsA: Curl PHP Google Custom Search
try to change if (isset($_REQUEST['q'])) { $termstring = urldecode($_REQUEST['q']); } else { $termstring = ''; } for if (isset($_GET['q'])) { $termstring = urldecode($_GET['q']); } else {…
-
0
votes1
answer41
viewsA: Base64decoder - PHP
Well try this function, where $output_file is the name of the path/file.png if your file has a date:image/png;Base64, remember a explode(",",$data) e usar o $data[1] If you can’t use the function…
phpanswered Marcos Brinner 1,282 -
0
votes2
answers68
viewsA: problem with dblclick event
I ran your code you are using Trim the wrong way syntax is string.Trim() and not Trim(string) You can see running here https://jsfiddle.net/hq5omaop/4/ jQuery(function($) { $('#tblEditavel tbody tr…
-
1
votes2
answers580
viewsA: Recover php array data via index value
Just use a forach to read the array Suppose your array is called $arr <?php foreach($arr as $prod){ echo $prod['id'] // ai é so chamar a variavel $prod com o indice } ?> Or if you want to…
-
3
votes2
answers83
viewsA: Query mysql return 4 Counts same table
you can use CASE with aggregated functions. this is an example that can work in most DBMS: select campo_id, count(*) total, sum(case when algumCampo = 'valoresperado' then 1 else 0 end) toal1,…
mysqlanswered Marcos Brinner 1,282 -
0
votes1
answer206
viewsA: fetch_array() error in php7
Change your code you are doing the fetch() sometimes put the MYSQLI_ASSOC inside your Fetch_array() <?php $selec = $mysqli->query("SELECT cpf_cnpj, isento, ... "); while($campos =…
phpanswered Marcos Brinner 1,282 -
2
votes2
answers414
viewsA: CSS Menu on Diagonal
You can use the CSS3 Rotate property below follows an example The effects you can use Jquery and Css @frame Animation In your thml <div class='celular'> <div class="transversal-bg">…
-
0
votes4
answers2107
viewsA: Search string on page with Javascript
Try this script <input id="searcher" type="text" name="searcher"> $('#searcher').quicksearch('table tbody tr', { 'delay': 100, 'bind': 'keyup keydown', 'show': function() { if…
-
0
votes2
answers422
viewsA: C# WPF - Accessing another XAML element by code
Well I got the way to do it here Class page1{ ((Window1)System.Windows.Application.Current.MainWindow).__mainFrame; } Where Window is the name of my class Window1 which references the xmal I want to…
-
0
votes2
answers422
viewsQ: C# WPF - Accessing another XAML element by code
Hello, I have two screens a Window and a Page loaded inside the screen Class Window1{ //to do .. __mainFrame; // acessa normal } Class page1{ //to do __mainFrame; // sem acesso ao frame } Inside the…
-
1
votes2
answers512
viewsA: Load html with Jquery
There are several ways to bring documents via DOM to the page load() $.post() $.get() create an array with the pages $(document).ready(function(){ $('.abas').on('click', function(){ var paginas =…
jqueryanswered Marcos Brinner 1,282 -
2
votes1
answer60
viewsA: Export . csv with complement of lines based on a fixed number
$paginaAtual = ""; $limite = 5; $conta = 0; while($dados = $export->fetch()){ //exibe produtos if($paginaAtual ==""){ //define a primeira pagina $paginaAtual =…
-
2
votes1
answer114
viewsA: Keep information in date format with PHP?
Try the following code: $objPHPExcel->getActiveSheet() ->getCellByColumnAndRow($i, $z) ->getValue() ->setFormatCode('dd-mmm-yyyy') Or as follows $objPHPExcel->getActiveSheet()…
-
1
votes1
answer902
viewsA: Email No Localhost or Mail Server()
How we detected your server is not working with php mail() There are some alternatives one of them is Mailer() which is a class that uses smtp request Download Mailerphp After downloading extract to…
-
-1
votes5
answers545
viewsA: Different format for display and return (bootstrap-datepicker)
$("#dateTo").datepicker({ startDate: '01/01/1998', endDate: '31/12/1998', onSelect: checaVazio, onSelect:function(theDate) { $("##dateTo").datepicker('option',{dateFormat: 'yyyy/mm/dd') } }) }) do…
-
1
votes1
answer59
viewsQ: How to use a hyphenated parameter in an HTML Helper?
Hello I’m using the Data Annotation ASP.NET MVC in C#, but I’m not getting past ASP.NET data-toggle in the helper CheckBoxFor: @Html.CheckBoxFor(model => model.ReceberEmail, new { @class…
-
1
votes3
answers1297
viewsA: Datepicker does not apply changes made
use the translation of the datapiker <script type="text/javascript"…
-
0
votes1
answer6946
viewsA: Take HTML input value and move to PHP variable
<input type="text" id="calendario" name="calendario"> Add a name to your field in php you can get via $_POST or $_GET depends on the method you send to the serivodor <?php…
-
0
votes2
answers1929
viewsA: How to put active class in navbar
Change your css by .navbar-nav .active { background-color: green !important; } And your script by $(window).on('load', function() { $('.navbar-nav li ').click(function() { $('.navbar-nav…
-
1
votes1
answer67
viewsA: Help with asynchronous request script
Inside your calendar.php file Add the following line $("#datepicker").datepicker("destroy"); your code will look like this <script> $(document).ready(function(){…
-
2
votes1
answer88
viewsQ: Javascript function duplicating data when dynamically loaded
I have a function called calculator to which the page is dynamically loaded several times (whenever the user calls the calculator page). When you first load it is normal, but the more you load the…
-
1
votes0
answers31
viewsQ: Handling Entity Framework Data Using C#
I have a database connection using the Entity Framework. The code is as follows: public IQueryable Empresas() { int idUser = Int32.Parse(self.IdUser()); var res = from s in db.EmpresaUsuario join c…
-
2
votes1
answer662
viewsA: Insert with Foreign Key (user + address(FK)) PHP(PDO) + Mysql
If you are using php PDO use the $db->lastInsertId(); $sql = 'INSERT INTO endereco(logradouro, numero, bairro, cidade) VALUES (:logradouro, :numero, :bairro, :cidade)'; $sql =…
-
0
votes1
answer162
viewsA: Error treatments 404 and 500
Create within Presentation/Views/Error/ Create two files Erro404.cshtml Erro500.cshtml Add to your web.config the following line <customErrors mode="On" defaultRedirect="~/Error.html"…
-
0
votes2
answers223
viewsA: Modeling Database
Create only the relacioanento table and don’t define the fields as Foreign key, you can store the values normally even if you have only one value.
-
0
votes1
answer225
viewsA: Select date from the current date using pickadate.js
Use min: new Date() in YYYY/MM/DD format See the documentation here and see examples $('.data1').pickadate({ formatSubmit: 'yyyy/mm/dd', min: new Date(2017,11,28), // defina aqui adata de hoje…
-
0
votes2
answers120
viewsA: Remove repetitions in select Oracle sequence
SELECT DISTINCT M5.CODIGO_ESTAGIO FROM MQOP_050 M5 WHERE M5.NIVEL_ESTRUTURA = 2 AND M5.GRUPO_ESTRUTURA = '00504' AND M5.NUMERO_ROTEIRO = 1 ORDER BY M5.CODIGO_ESTAGIO To do this use the DISTINCT AND…
-
0
votes2
answers162
viewsA: Add original width/height to image tags
var tmpImg = new Image(); tmpImg.src="https://assets.servedby-buysellads.com/p/manage/asset/id/32054"; //or document.images[i].src; $(tmpImg).on('load',function(){ var orgWidth = tmpImg.width; var…
-
0
votes1
answer507
viewsA: change class label according to text
Search for $("tbody td") and check the value with $(this).html() instead of $(this).text() As the code below $(document).ready(function () { var rt = $("tbody td").each(function () { if…
-
0
votes2
answers84
viewsA: How to work the return of a select max query?
try using fetch() no for $atestados = $conect -> query( "select max(protocolo) AS maximo from atestados"); foreach( $temp = $atestados->fetch() ) { echo $temp["maximo"]; } if no results, use…
-
3
votes1
answer1550
viewsQ: Convert Char to string in C#
I’m trying to convert a char into string to use in split(), but it’s no use string path = HttpContext.Current.Request.Url.AbsolutePath; path = path.ToString(); string[] caminho = path.Split("/"); I…
c#asked Marcos Brinner 1,282