Posts by Marcelo Bonus • 377 points
17 posts
-
0
votes2
answers98
viewsA: No need to escape the "." in a field [...] in REGEX?
Have different meanings . can be any character, already \. is understood as the dot character. But you should notice the context of the expression, in this case it is concatenating the intervals of…
regexanswered Marcelo Bonus 377 -
1
votes2
answers369
viewsA: Field allowing only an exact amount of data
If the field is new: ALTER TABLE cartoes ADD COLUMN os_4_ultimos_digitos CHAR(4); existing field: ALTER TABLE cartoes CHANGE COLUMN os_4_ultimos_digitos CHAR(4); tries to reduce the name of this…
mysqlanswered Marcelo Bonus 377 -
0
votes3
answers785
viewsA: How to treat the logged-in user in a MVC system?
In this case there is a table in the database (Permissions) where the access permissions of the profiles are (Admin, Editor, Common), in this table is placed the addresses that the user can pass..…
-
0
votes1
answer44
viewsA: Wordpress problem with template to access the page
checks the value of these terms: if ( ! function_exists( 'wp' ) && ! empty( $_SERVER['SCRIPT_FILENAME'] ) && basename( __FILE__ ) == basename( $_SERVER['SCRIPT_FILENAME'] ) ) { die (…
-
2
votes1
answer96
viewsA: PHP does not find files when running on the terminal
You can create global variables: define('DIR', dirname(__DIR__)); define('ROOT', __DIR__); When you run by some server ampp you are running the project as if it were a folder, when running from the…
-
1
votes1
answer422
viewsA: Carousel Vertical with Bootstrap
I believe the options you want are not configurable in bootstrap Carousel even because it would lose the characteristics of Carousel. I recommend developing the slide for you or looking for one that…
-
1
votes1
answer1159
viewsA: PHP WITH ANDROID CAMERA
With php you won’t be able to access any hardware resources, depending on your goal you can create a PHP backend that will provide some features via REST and the client device should have an android…
-
2
votes2
answers349
viewsA: Change Bootstrap icon in Mobile version
You can use the Responsive Utilities of bootstrap: <i class="glyphicon glyphicon-arrow-right hidden-xs"></i> <i class="glyphicon glyphicon-arrow-down hidden-lg"></i>…
-
1
votes2
answers157
viewsA: How to save a file in Vim
Press ESC and type :w to save or :x to save and get out
-
0
votes1
answer148
viewsA: Different layouts in cakephp
by default all actions come with the layout/default.ctp set, you must create one more layout and in the action you will have different layout you arrow: $this->layout = 'login';…
-
1
votes1
answer121
viewsA: Link counter - no external page, using JS onClick() or other solution in PHP + Mysql
You can do the click system with jQuery: $('a').on('click', function(){ alert(this.href); }); but for there to be no blocking of the Voce user’s navigation you must save to the bank in an ajax call:…
-
4
votes1
answer3515
viewsA: Create an associative array from another foreach array?
maybe this solves, makes a foreach in the list and in each round Voce checks if it is the same student from the previous round, if not, then creates a new position in the array with the student’s…
phpanswered Marcelo Bonus 377 -
2
votes2
answers557
viewsA: Responsiveness in Bootstrap
To keep the layout responsive use the property max-width: ?px; width should stick to the value 100%;
-
1
votes3
answers5016
viewsA: Form validation in modal using Bootstrap
if someone is still in need... something like this can be done, first cancel the form Ubmit with Event.preventDefault() then scans all inputs $.each() to check if they are filled, and finally the…
-
-1
votes1
answer755
viewsA: how to count number of input file elements of html with php?
if this is your $_FILES['pic' input] then you only have one input, if you want to count the images inside it makes a sizeof($_FILES['pic']) and if you want to go through the images do a…
-
2
votes4
answers3901
viewsA: Question about each() in Jquery
Because at each turn of the loop you are making a new query to the DOM. The $.each() structure allows you to access the element index and the element itself, without redoing the DOM query:…
-
3
votes1
answer254
viewsA: Convert Mysql to Mysqli
I prefer the use of $conn = mysqli_connect('localhost','root','','bd'); mysqli_connect is an alias for the class builder, you can test the connection by checking $Conn if(!$conn){ echo…