Posts by Marcos Henrique • 1,445 points
48 posts
-
0
votes0
answers51
viewsQ: Python ctypes ERROR: Exception: access Violation writing 0x00DEF6CC
I’m trying to import a dll C/C++ with the lib ctypes and use a function that it has internally, when passing the parameters to this function I always come across the error: ERROR: exception: access…
-
1
votes4
answers2298
viewsA: Printing a number odd sequence on a list
I believe the most efficient way would be to use comprehensilist on (which is a concise way to create and manipulate lists, i.e., it applies the expression on each item in the list) in this way:…
-
0
votes2
answers84
viewsA: Syntaxerror: invalid syntax, somebody help me!
Defining a Function: You can define functions to provide the required functionality, here are simple rules for defining a function in Python. Function blocks start with the def keyword followed by…
pythonanswered Marcos Henrique 1,445 -
3
votes3
answers580
viewsQ: Grab a JAVA array
I am new in java, because of this I have the following situation, I would like to take the array in my case 2 of switch, the problem is that it says the value was not initialized, but I first enter…
-
1
votes1
answer1140
viewsA: Error creating database with sqlite
The error may be in the folder path, because cmd has problems with accent, pass your folder to the root that will work, the problem is in the same name.
-
1
votes1
answer438
viewsQ: Take the size of an image
There is the possibility to take the size via javascript of an external image to my directory? For example in this use: .divExterna{…
-
1
votes3
answers1458
viewsA: Javascript - Line break in file . txt
Man you can do the following: var valor = "Essa é a linha 1\nEssa é a linha 2\nEssa é a linha 3"; if (/[\n|\n\r]/.test(valor)) { alert("Existem quebras de linha!"); } else { alert("Não existem…
-
1
votes2
answers1306
viewsA: Study Angular 1 or 2
Taking into account your questions, yes angular js is a very agile framework because with it it is possible to use modules and apply directly to your html, thus makes your own code in a scope, the…
-
0
votes3
answers2199
viewsA: Offline and online PHP application
The sqlite follows the same principle of mysql, how do you use the php, follows an example: http://php.net/manual/en/sqlite.setup.php, in your case you would make a if checking if there is…
-
0
votes1
answer99
viewsA: Login SOAP Web Service
From what I understand of your question, you would need a query to the database with the user passed by Session, so checking whether this user first it is registered, and soon after if it has the…
phpanswered Marcos Henrique 1,445 -
0
votes1
answer147
viewsA: Stop Jquery request by refreshing the page or clicking on a link
Dude from what I understand you can check if the event occurred Reload, as an example: if(location.reload) { req.abort(); } So if it occurs you call your function aborting the request. In the case…
-
0
votes1
answer111
viewsQ: Manipulating input date
I have a input of the kind date, i would like to manipulate this input, because when it runs on iOS(phonegap app) it becomes a combo, so when I run an event of onChange, there would be some way to…
-
5
votes1
answer983
viewsQ: Algorithm - How to catch days in a JS week
I have the following situation: I need to set the days of each week within a month, creating an array of JSON objects. Each position would correspond to a week, for example if there were 5 weeks I…
-
0
votes2
answers10008
viewsQ: Add a value to a JSON object
How could I add a value chain to an object JSON? For example: var a = 12; var b = 3; var obj = { c: 11, d:22 } console.log(obj); How could I apply to and b, within my variable obj to become part of…
-
0
votes0
answers81
viewsQ: <video> no sound on iOS
I’m using the html 5 video tag, but when running on an iOS (an app using phonegap) there is no sound, which can be? I followed exactly the example used by W3schools and even then there is no sound.…
-
1
votes1
answer105
viewsQ: Your binary does not support iPad
I realized the creation of a "web app" using phonegap, when sending it to itunes, I got the following warning: "Your binary does not support iPad", how to proceed? Someone could help me, because if…
-
2
votes1
answer219
viewsQ: How to manipulate a link in href
Is it possible for me to treat a link, for example when I click and the page does not exist, I redirect to some specific place? For an "ops this link does not exist" page for example. Because in my…
-
13
votes1
answer16196
viewsQ: Difference between keyup(), keydown() and keypress()
I’d like to know the difference between keyup(), keydown() and keypress(), in my opinion I think they do the same thing, but what is the purpose of each? Performance improvement for each type?…
-
2
votes1
answer1039
viewsQ: How to make a select starting with a certain line
How do I get one Select starting for example from the second row of my table? I know that using the ASC limit 1,1 I can pick the second line, but how to start from it?…
-
1
votes1
answer22
viewsQ: Is it possible to perform a "prepend" on an attribute?
I have the following situation: When I make the request from my bank, my tags <img> comes with the attribute src filled, is it possible for me to perform a prepend in the same? For example:…
-
0
votes1
answer1208
viewsQ: How to leave a selected option
How do I leave selected one option via jquery? I know it’s because of your attribute selected, but I have no idea how to do this. The following code to illustrate how I was doing: Session var sessao…
-
3
votes1
answer766
viewsQ: Run function only the first time you open the page
I’m developing an app using the Phonegap, the same uses the front-end to create apps, so I would like to do the following: run a specific function (such as an alert) the first time the application…
-
4
votes1
answer1214
viewsQ: By clicking a php run button
Is it possible for me to merge the php with the jQuery? For example, when you clicked on a button you picked up an input value via jQuery and move on to php, an example of what I’d like to do:…
-
4
votes3
answers3833
viewsA: Return in hours the difference between two dates in JAVASCRIPT
See if this code helps you: data1 = new Date('2014/01/01'); data2 = new Date('2014/04/01'); var diferenca = Math.abs(date1 - date2); //diferença em milésimos e positivo var dia = 1000*60*60*24; //…
javascriptanswered Marcos Henrique 1,445 -
4
votes5
answers1294
viewsQ: change the title of a Window confirm()
I wonder if somehow I could change the title of a window confirm(), because I’m developing an app using phonegap and when called this window it presents me the title with the name of my html file, I…
-
0
votes3
answers210
viewsA: Installation Phonegap
This problem is due to a bad installation, from what I understand, just give an update sudo npm update -g , so it will force the upgrade, so it will start working normally.
apache-cordovaanswered Marcos Henrique 1,445 -
3
votes2
answers525
viewsA: How to pass value to label in modal
Just pass the delimiter in case the id of its input: var novoLabel = $('#textoDescricao').val(); $("#teste").text(novoLabel); So you wouldn’t use this "modal.find", just look for the element…
-
0
votes1
answer153
viewsQ: Exchange values from a div
I have a combo when the event occurs onchange it performs a query in the database with the selected value and inserts it into a div values, the problem is that when I apply…
-
1
votes1
answer199
viewsQ: Mask in image
I am trying to apply a "mask" to my image, to take only the center of it and apply 50px for 52px, tried to use the clip-path but it doesn’t work, I’m using the opera and the Chrome for testing,…
-
3
votes3
answers13886
viewsQ: Take the value of a dynamic select
I wonder how I get the value of a <select> dynamic, ie when I modify the value it presents me this value, I imagine something like below, someone could help me? varItens =…
-
1
votes4
answers2938
viewsA: Link without using href
You can perform the following: HTML <a class="meuClick" style="cursor:pointer;">Aqui</a> In his javascript: $("a").on('click', '.meuClick', function() { //faça algo } Using this method,…
-
1
votes1
answer88
viewsA: Scroll inside a javascript table
You can add a overflow:scroll for your div, as in the example below I have two Divs a right and a left, each with its respective scroll: #left { float: left; width: 50%; background: red; height:…
-
1
votes2
answers1226
viewsA: div 100% height - CSS
In addition to the above mentioned alternative by @flpms it is possible to find out the screen size, and through jquery implement in your css this height. var altura = $(window).height();…
-
8
votes5
answers23670
viewsA: How to make Javascript calculations accepting comma to separate decimal places
You can use the replace where you delimit the character to be replaced and then pass it to float: var comVigula = "1,87"; comVirgula = parseFloat(comVirgula.replace(',','.')); alert(comVirgula);…
javascriptanswered Marcos Henrique 1,445 -
3
votes1
answer99
viewsA: difficulty working with CSS in responsiveness
As spoken by the comments, I think is the best option for responsiveness: the Bootstrap works with a system of grids (grids) to position the elements on the page. This mechanism functions as a kind…
cssanswered Marcos Henrique 1,445 -
0
votes5
answers106
viewsA: link is not called
I would use the following excerpt: $("#link_new_ad").on('click', '#bundle_ad_submit', function() { alert('teste'); }) Why so the event on, "would hear" the GIFT and see when it was born.…
jqueryanswered Marcos Henrique 1,445 -
2
votes4
answers5013
viewsA: What’s the content of the Github?
It would be like the stackoverflow of each application, where the tags are associated so that others can help in your problem, or get information.
githubanswered Marcos Henrique 1,445 -
1
votes4
answers3072
viewsA: How to leave a height-height fixed on the page?
You can make a <script> where you take the height of your viewport, and then move on to your css, for example: var minhaAltura = $(window).height(); $('.ondeQuero').css("height",minhaAltura);…
-
6
votes1
answer54
viewsQ: Identify a specific part of the screen
Is it possible for me to identify a specific part of the screen with Jquery’s javascript? For example when going through height y it perform a function for me? I imagine something like: var…
-
3
votes2
answers2818
viewsA: What is "Inversion of Dependency Principle" (DIP)?
We can consider the low-level classes the classes that implement basic and primary operations (disk access, network protocols) and high-level classes (business flows). A natural way of implementing…
-
2
votes4
answers352
viewsA: What is the second parameter of array_keys for?
From what I understand it returns only the values you specify, serving as well as an even search option, as the name suggests.` <?php…
phpanswered Marcos Henrique 1,445 -
9
votes7
answers4205
viewsQ: Count elements on the screen
I wonder if there is the possibility of me counting the elements on the screen, for example a function that lists the amount of <li> arranged on my website. How could I do that? And how would…
-
5
votes4
answers318
viewsA: Div inside another broken div
You can insert a class to manipulate in css. And you can define that they’re right inline, as an example: .menu { display: inline; } <div id="menubarwidget"> <div class="menu"…
-
2
votes1
answer862
viewsA: Redirect user to Google Maps app
I think this code would solve your problem: javascript:window.open("geo:"+latitude+","+longitude+"" , "_system"); It offers the native option and the google maps for the user, and if you want to…
-
1
votes2
answers1977
viewsA: Break Line Correctly in a List with Data Binding Angularjs
Instead of just entering your data directly into your <i> , you could create a div, and pre-determine its size, done this could use a javascript to count the size of the texts and so when…
-
3
votes2
answers330
viewsA: Why do my Jquery events stop working after an AJAX request?
Because it is a dynamic request (coming from the DOM) it is necessary to inform the class where it is inside, as the example below: $('.minhaClasse').on('click', '.classeInterna', function() {…
-
6
votes1
answer977
viewsQ: Insert data into an External Json
How to insert data into an external Json file: var json = { caminho: "img/minhaIMG.png", descricao: "minha descricão" } How can I enter new data into this json file? In my case, I would use it as a…
-
0
votes2
answers987
viewsQ: Phonegap Build how to change Cordova version
When publishing my application on google play the same was rejected, the reason was this: Security alert We would like to inform you that your app was created in a version of Apache Cordova that…