Posts by Elaine • 2,770 points
79 posts
-
0
votes1
answer358
viewsQ: Error: E0254 type name not allowed
I’m getting this error in this code: bool Configuration::GetConfigBlockLine(ifstream& file, string& key, string& value) { string line; // end of file while( !file.eof() ) { // read line…
-
-1
votes1
answer25
viewsQ: Errors: Division by zero and iterator not dereferencable
I’m having trouble compiling this code, it returns me two errors while running it: vector<bool> cp( size ); // determine crossover point (randomly) for( int i = _numberOfCrossoverPoints; i…
-
1
votes1
answer717
views -
3
votes2
answers220
viewsQ: Problem with access to "Undefined" properties
I have a variable that looks for a input and from that she works getting information from her. The problem I have is that when the input is not there, the script for saying that it cannot access…
-
1
votes2
answers411
viewsQ: Center div inside scroll
I have a father div that has the scroll enabled and a width limit, below it I have another div with content. My wish is to center this content on the parent div so that the content is centralized,…
-
2
votes2
answers1004
viewsQ: Group table data with two columns
Well, I am in a incognita that I would like to solve directly in the SQL query, see this supposed example: TIPO | DE | IDENTIFICADOR ------------------------- 001 | 23 | 9 001 | 44 | 9 001 | 23 | 8…
-
3
votes1
answer1133
viewsQ: Columns with equal names in a single query, mysql
I’m performing a Mysql query in this style: select contents.*, users.* FROM users, contents Between the two tables there are columns with the same name, and when you pull them with PHP it results…
-
1
votes0
answers57
viewsQ: Good practices with contenteditable
I just found the tag contenteditable and I’m using it in my projects. What good practices should I have regarding security, since this tag makes possible colar anything in its original form, bugging…
-
4
votes3
answers649
viewsQ: Limit characters in div with contenteditable
I have a div with contenteditable="true" and would like the text that goes beyond 10 characters to be taxed with background red, as happens on Twitter. My main question is how to tax only the…
-
2
votes1
answer75
viewsQ: Sort Mysql results by preference
I own a table of produtos where there is the primary column id, wish to select products with the probable name of "%TV%" however i want it to be ordered so DESC normally, however I want some IDS…
-
0
votes1
answer75
viewsQ: Get div high up in the hierarchy
I have this hierarchy in HTML <div class="footer"> <div class="send_show" style="height: 754px;"></div> <div class="forms_sends"> <span class="sends"> <div…
-
1
votes1
answer576
viewsQ: str_replace generating error Array to string Conversion
I am trying to change some characters demonstrated in array by empty space but the code causes me the following error: Array to string Conversion str_replace($string, array(',', '.'), '') I see no…
-
2
votes1
answer461
viewsQ: Word to number conversion and vice versa
Is there any way to turn whole words into unique numbers so that I can do the reverse process if necessary? Like it was a unique ID of that word, like Palavra -> Numero -> Palavra oi ->…
-
4
votes1
answer563
viewsQ: Algorithm to find common word sequence
I’m looking for a logic where I can find in an exorbitant amount of data, phrases that are common. Phrase in this context is word sequence. For example in these prayers: I’m traveling to South…
-
1
votes1
answer116
viewsQ: Conflict $ between scripts
I’m trying to use these two scripts: http://suprb.com/apps/gridalicious/js/jquery.grid-a-licious.js http://suprb.com/apps/gridalicious/js/jquery.fittext.js But I use jQuery and Prorotype on the same…
-
0
votes1
answer321
viewsQ: Div with height equal to background-image
I’m with a div and in it there’s a background-image of height variant, I wish that div had exactly the same height of this image, so that it does not get cropped. It’s something like that: <div…
-
1
votes1
answer15
viewsQ: Maximum call [...] while trying to open file dialog
HTML <div class="send">click<input name="files[]" class="file" type="file"></div> Javascript: $('body').on('click', '.send', function(e) { $(document).find('.file').click(); });…
-
0
votes0
answers65
viewsQ: Turn CSS rules into abbreviated rules using PHP
Having a CSS file would like, using PHP, to change a line by joining the rules that can be abbreviated. For example in this code: margin-top: -2px; -> abreviável para MARGIN padding-right: 40px;…
-
6
votes0
answers107
viewsQ: Group code in a row
Well, I would like to change my CSS code by joining the parameters that are "joinable" For example this code: { margin-top: -2px; -> juntável com MARGIN margin-right: 40px; -> juntável com…
-
3
votes2
answers12596
viewsQ: Get general project directory, php
How to get the root of the project folder with PHP? My research tells me to use DIR however this returns the direction depending on the location of the file, and I want the root of the project, very…
-
1
votes1
answer96
viewsQ: PHP does not find files when running on the terminal
I run the file x normally, in it I include through require_once various other files, and through the browser I run it normally. But when I run the file by terminal it does not find the same files,…
-
2
votes1
answer744
viewsQ: Using PHP in the terminal, xampp
I’m trying to use PHP through the terminal, but I can’t, when I type which php he returns /usr/bin/php so I can’t run PHP files, because it can’t find the files. I am using XAMPP for MAC…
-
1
votes1
answer38
viewsQ: Problem with Return
I have a problem with return since the node is all asynchronous. var myFUNC = function(A, B) { A.every(function(AA) { return (AA === B); }); return true; }; if(!myFUNC(...)) { .... } obviously the…
-
1
votes3
answers67
viewsQ: Format buffer, php
I don’t know if the right word is buffer but how do you make Javascript code "clean" that way: ({"content":"<div id=\"_sub-item\">Espere, ser\u00e1 exibido ap\u00f3s o carregamento dos…
-
6
votes1
answer83
viewsQ: Access properties without knowing name
You can access all your settings inside the class (estates) without having their names? For example, if I create an instance of a class $classe = new Classe(), and I’m defining things in her:…
-
2
votes0
answers77
viewsQ: Programming standards with safety and simplicity
Maybe this question sounds broad but deep down it is not, I am not graduated in anything so I only have bad practices on my back and wanted to learn to program in a way not only "standard" and yes…
-
5
votes1
answer453
viewsQ: Use Node.js or PHP with Websockets?
Using Websockets for my project, at the end was an extensive project with thousands of lines of PHP code. As soon as I finished writing everything and "finish" I am told that running Websockets with…
-
4
votes3
answers18966
viewsQ: Browse objects with pure Javascript
I need to list objects and resort to the following function which is in jQuery. There is an alternative to this only in Javascript? $.each(object, function(index, value) { console.log(value); });…
-
4
votes2
answers5603
viewsQ: Check if it is empty regardless of type, javascript
I am trying to create a function that checks if you have something blank, empty, Undefined, null etc.. But my difficulty is that I don’t know all the ways a string is "blank" I created this function…
javascriptasked Elaine 2,770 -
0
votes1
answer602
viewsQ: Run array with WHEN method, javascript
Well, I have an array of numbers and I need to send each separate checker to the server, but I need to wait for all of them to be executed before I perform my final action. I searched and then…
-
4
votes1
answer283
viewsQ: Calling a Setinterval variable
I have the variable X X = setInterval(function() { ... and after a while I stopped in that setInterval with the function clearInterval(X) How do I call this variable to continue the loop after I…
-
0
votes2
answers1135
viewsQ: Check if pattern is followed, JSON and PHP
There is a small request pattern with multiple parameters, but I’ll simplify it this way: $parametrosdBase = array('nome' => false, 'codigo' => 83474, etc.. I get a string in JSON format that…
-
3
votes1
answer36
viewsQ: Know where click comes from when you have multiple options
In this case: $('body').on('click', '.a, .b, .c', function(e) { ... how will I know when the click came from . a or . c for example?
-
4
votes2
answers961
viewsQ: Calculate maturity date
I have a column called START in DATETIME format in Mysql and I would like to check if each Row is expired and/or how many days are left to win that Row, taking into account that Row expires 30 days…
-
3
votes4
answers21716
viewsQ: "Height: 100%" does not occupy all height
There is no way the side in red is 100% so both have the same size, how to solve? <div> <div style=" min-width: 180px; width: 20%; height: 100%; background-color: red; float: left;…
-
1
votes2
answers137
viewsQ: Pure CSS element animation
As I can perform a scheme in pure CSS with a ball simulating the traffic, the ball would be circulating in the lines, see a scheme SERVER --------> YOU /\ | | | | * |____ ME <_______| It got a…
-
2
votes1
answer860
viewsQ: Menu with vertical and horizontal balls
How can I make these two menus? I got it from the Twitter site, but I didn’t want to get their codes, how can I do that? so that I can add infinite numbers with their respective descriptions..…
-
4
votes2
answers161
viewsQ: How to turn a hash into a color
How to turn a hash into a random color.. Notice that I used the expression "hash" only to say that a cluster of letters/numbers can be transformed into colors, like this:…
-
9
votes2
answers23399
viewsQ: Picking up parent div attributes through child elements
I own several structures that follow a unique style: <div data-id="1"> <div> <button>Descobrir é o data-id desta estrutura</button> </div> </div> with jQuery or…
-
8
votes2
answers161
viewsQ: How do I manage my messaging flow?
I have this Javascript code that represents my connection to the Websockets server, where it receives and sends messages to the server: var connection = new WebSocket('ws://127.0.0.1:2333');…
javascriptasked Elaine 2,770 -
0
votes1
answer75
viewsQ: Don’t let connected connect, PHP
I’m working on a server Websockets that manages connections however I can not solve this small impasse, not for lack of understanding of the code but for not knowing how to do.. Look at that, The…
-
0
votes1
answer126
viewsQ: > (Node-Gyp rebuild 2> builderror.log) || (Exit 0)
I’m running sudo npm install websocket on my Mac with nodejs but causes me this error, how to fix? npm install websocket - > [email protected] install /Users/Vinicius/node_modules/websocket >…
-
5
votes1
answer1536
viewsQ: How to get started with Webrtc, I’m lost
I need to develop a simple project: link between points that share video and audio (video called in case), simple, only in theory. I started researching the subject and I’m completely lost, there is…
-
1
votes2
answers475
viewsQ: How to avoid error when variable not declared
I have a function that defines onlytest after the first execution of another script, but in the first execution it was not defined.. How can I detect that it was not set and give a return; Why does…
javascriptasked Elaine 2,770 -
2
votes2
answers162
viewsQ: Counter in M:S format, javascript
How to make a counter in Javascript/jQuery where it is in this format 00:00 and that it stops and performs an action is stopped, but its limit is 10 minutes, can only stay from 0 until 10 minutes,…
-
6
votes1
answer3099
viewsQ: Uncaught Syntaxerror: Unexpected token this
When this code is run all together gives this error, but if it is formatted with line breaks it runs normally, how to fix? Error: Uncaught Syntaxerror: Unexpected token this Code in question: var…
-
1
votes1
answer1545
viewsQ: Uncaught Rangeerror: Maximum call stack size exceeded
Uncaught Rangeerror: Maximum call stack size exceeded function updateAnalysers(id) { var canvas = document.getElementById(id); canvasWidth = canvas.width; canvasHeight = canvas.height;…
javascriptasked Elaine 2,770 -
13
votes2
answers1261
viewsQ: Detect extended click, javascript
Assuming these types of click: 1 CLICK 2 CLICKS IN A ROW EXTENDED CLICK i know how to detect normal click and dbclick but how to detect extended click? that click you click and secure for X time for…
javascriptasked Elaine 2,770 -
0
votes2
answers78
viewsQ: Wait variable to be set to "open signaller"
I have the variable x that goes through processes to be really defined and it takes a while, and to mess with the rest of the application I need it to be defined, that is I need to wait for it to be…
-
4
votes3
answers487
viewsQ: How to update PHP Timezone with javascript using the Date.getTimezoneOffset function?
I’m getting the TMZ end user with this code: TMZ = new Date().getTimezoneOffset() for me it returns 180 and this number I send to the server, so that it adjusts his time with mine, but the function…