Posts by Adir Kuhn • 2,342 points
69 posts
-
3
votes4
answers361
viewsA: Decrease span field value with preg_replace
I also recommend using dom parser but just for the fun ta ai a beta version using regex <?php $html = <<<XXX <div id="isOffered"> <a class="price addBetButton footballBetButton"…
-
1
votes2
answers73
views -
5
votes2
answers1138
viewsA: Is there an Interpreter for C?
There are several you can use own GDB as interactive shell, another debug that can be used as interactive shell is the UPS. Beyond the Picoc already quoted by you can also quote ccons the c-repl Ch…
-
2
votes2
answers74
viewsA: Unrecognised function
The expected variable is being returned possibly as an object array, try checking with the var_dump command var_dump($prevista); To get the values of $predicted you have to make a loop…
-
4
votes1
answer11627
viewsA: Mysql ERROR - #1452 - Cannot add or update a Child Row
Apparently SQL has no error (only a comma is missing after creating the state id). As for FK possibly has some value in vacancies(city) that does not exist in cities(id)
-
1
votes4
answers9005
viewsA: Why is HATEOAS important?
What we have today in most services are wrong implementations of the concept of REST, so much so that it has a strand that tries to fix this by calling the API’s that really seek to be REST of…
-
0
votes3
answers1072
viewsA: Regex pick certain digit size and or symbol
that expression should serve \d{9} https://regex101.com/r/fY8sN3/1 Update to display the ! together \d{9}!? -- One solution to this other is \b\d{9}!?\b https://regex101.com/r/fY8sN3/3…
-
4
votes4
answers6834
viewsA: Find character in string
usa strpos http://php.net/manual/en/function.strpos.php where you can make a loop by passing the $offset from where the function should start to search Something like that <?php $texto = "um…
-
7
votes2
answers3180
viewsA: Parse error: syntax error, Unexpected ''
another solution is to specify the variables $msg ="{$this->usuario} {$this->senha} {$oneclick['card']['cardNumber']} {$oneclick['card']['holderName']} {$oneclick['card']['expirationDate']} ";…
-
1
votes1
answer154
viewsA: Add the same product in various categories
A solution is to use a weak entity for this, assuming the model categorias ---------- categoria_id categoria_nome produtos --------- produtos_id produtos_nome categorias_produtos…
-
8
votes2
answers775
viewsA: How to Vector/Array integers indexed by strings?
Possibly PHP addiction right, I’ve been there, I think the solution closest to this is Std:map #include <iostream> #include <string> #include <map> int main() { std::map…
-
1
votes2
answers894
viewsA: Problem with SUDO "must be setuid root"
Maybe you have not configured root password, try to do this: $ sudo passwd root Enter the password for the root user ai try to install the packages you want. If it doesn’t work check the sudo file…
-
3
votes2
answers5383
viewsA: How to select all characters except some specific words using regex?
it would be good to know the language you are working to know a more efficient way to help you since denying word in regex is not easy http://aurelio.net/regex/guia/negar-palavra.html#5_3 As you…
-
5
votes3
answers301
viewsA: What is the advantage of using include de array vs configuration file?
In answer to your question we can mention several advantages and disadvantages in each type of configuration file in array for example one can create more complex data structures than using INI, but…
-
1
votes1
answer498
viewsA: Sort by date
Using symfony2 you can already bring the ordered data in the query. There are several ways to do it, you can do the query directly in the Controller or create an Entityrepository For example in the…
-
1
votes1
answer591
viewsA: How to optimize memory consumption using Doctrine
The problem is precisely in the file size, only counting by the number of lines the file should be more than 50M. Then there’s not much to do your memory consumption will be high even. I suggest two…
-
1
votes1
answer136
viewsA: How do I switch from a native php version to a version installed by Brew on Maverick?
See which folder the php you installed by Brew is in and modify the web server configuration file to use the modules there. If you want to delete by command line if you have entered in /usr/bin/php…
-
0
votes2
answers148
viewsA: Consultation that feeds grid and subgrid?
Hello, well I believe you should be talking about doing an SQL query. Normally it is complicated to bring this organized data from a query but you can do this using Django’s ORM if you have made the…
django-rest-frameworkanswered Adir Kuhn 2,342 -
20
votes10
answers34548
viewsA: What is the difference between the == and === Javascript operators?
Typically weakly typed languages undertake the conversion of data types. So when you use the operator ==, the language does the cast or conversion of types for comparison of values. Already the…