Posts by Luke Negreiros • 305 points
17 posts
-
-1
votes1
answer68
viewsQ: What is the regex for all accented, whole words coming from a variable?
Starting from a variable var palavra = 'nascer' (for example) which regular expression takes all the words whole of a text? Including words that have an accent at the beginning or end.…
-
2
votes0
answers62
viewsQ: What is the right way to search and replace HTML words
I am redoing a brief text editor in the browser. I am using an editable div that contains the following: <div id="content" class="content_editor" contenteditable="true"…
htmlasked Luke Negreiros 305 -
0
votes0
answers7
viewsQ: Right parenthesis error on the base line
I am running a database database. the use of liquibase is mandatory. What I always do, is run the local queries and after everything ok, mount the base with the query inside the changeSet down…
-
0
votes1
answer23
viewsQ: INSERT using SEQUENCE . NEXTVAL with another SELECT
I can insert with this query in ORACLE INSERT INTO CONF_CODE (ID, OPTION_NAME, ISCHECKED) VALUES (SEQ_CONF_CODE.NEXTVAL, 'Producao', 0); But I need to fill this table CONF_CODE with a SELECT from…
-
1
votes0
answers24
viewsQ: Jquery Ajax does not display Object in the PUT method, using . net mvc
I own the Object var obj = { nome: "Felipe", idade: 23 } I created an ajax call by jquery like this: $.ajax({ url: 'ConfigCode/UpdateOptionsStatus', // route controller na web type: 'PUT', data:…
-
0
votes2
answers25
viewsA: How to instantiate a class with predefined and immutable parameters C#
I resolved as follows: creating a class Jogo public class Jogo { public string Name { get; set; } public Genre Category { get; } public string Plataform { get; set; } public Jogo(string name, Genre…
-
0
votes2
answers25
viewsQ: How to instantiate a class with predefined and immutable parameters C#
How to instantiate this class jogo? public class Jogo { public string Name { get; set; } public string Genre { get; } public string Plataform { get; } public Jogo(string name, string genre, string…
-
2
votes1
answer89
viewsQ: Jquery autocomplete UI with PHP returns only whole words
I’m in my first project with php + Mysql with a search input from words using Jquery UI. Every tutorial I’ve done, display the words as the user type, such as a substring. Thus: Being 'as' a…
-
1
votes1
answer35
viewsA: How to build a kernel size for an opencv Medianblur filter
Solved. It was enough to leave the m_pos odd, as indicated in error (ksize % 2 == 1). The code went like this: m_pos = cv2.getTrackbarPos('Median', 'Median Blur') if(m_pos % 2 != 1): m_pos = m_pos +…
-
0
votes1
answer35
viewsQ: How to build a kernel size for an opencv Medianblur filter
I have this Medianblur filter in opencv: import cv2 img = cv2.imread('Resources/land.jpg') imgGray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) def empty(a): pass # ------- CREATE TRACKBAR -------…
-
2
votes1
answer64
viewsQ: Regex: how to select whole sentence (no digits) and insert quotation marks
I got this result from a . csv 9 Abraço de tamanduá 9 Abraço fraterno 9 Correr/partir pro abraço (futebol) I am applying several regex so that the end result is an SQL statement like this: INSERT…
-
4
votes2
answers112
viewsQ: function does not execute regex equal words
I got some string: "novamente mais brevemente uma vez claro, claramente demente, igualmente. novamente." I run a Javascript regex to get the words finished in "mind": var target =…
-
3
votes1
answer46
viewsQ: format paragraph <p>
I run some js functions in a given text. adding classes and removing classes. The final html generates some breaks in the paragraph, like this: <p style="text-align: left;"> “obviamente” “ nem…
-
0
votes1
answer41
viewsQ: AJAX jquery request generating an array with only one field loaded
i have an array of objects - JSON: [ { "nome": "Luis", "numero": 14 }, { "nome": "Pedro", "numero": 12 }, { "nome": "Maria", "numero": 1 } ] how do I make an AJAX (jquery) request that returns only…
-
0
votes2
answers27
viewsA: I have a variable set by parameter. How do I use it on buttons (Action Performed)?
I ended up learning to use Action Listener and Action Performed. :) solved. being like this: public App(int id) { jButton.AddActionListener(...){ Action Performed(){ /*ação do botão com o 'id'*/ } }…
-
-1
votes2
answers27
viewsQ: I have a variable set by parameter. How do I use it on buttons (Action Performed)?
I received this variable (per parameter) from another Jframe: public App(int id) { System.out.println("teste: "+id); /* codigo aqui... */ } and wanted to use inside that 'action performed button':…
-
0
votes2
answers34
viewsQ: jTable does not add the second string I put in an array
I created an array with two values and wanted to put it in a table... with an insert button (insert several lines) 1-I declared the string line[] and the values below; 2- I thought a 'for each'…