Posts by Kelvym Miranda • 349 points
14 posts
-
3
votes1
answer135
viewsQ: Regex - Take format without strings around
I’m trying to do a regex to get Slack formatting. Ex.: *a* => Take it to make bold An initial regex I did was: /\*(.*?)\*/g The problem: Can’t have anything around the string(No character stuck…
-
2
votes3
answers160
viewsQ: What is the logic behind this function?
Why the result of L1 is: [2, 3, 4] instead of [3, 4]? def remove_dups(L1, L2): for e in L1: if e in L2: L1.remove(e) L1 = [1, 2, 3, 4] L2 = [1, 2, 5, 6] remove_dups(L1, L2) print(L1) I tested in…
-
0
votes1
answer228
viewsQ: PHP/Mysql - Print values with relation between tables
In a system I need to print paint cans and each one has its own colors. I did it in a way that works, but repeats several times the requests in the database. I made two tables(Example): latas…
-
2
votes1
answer559
viewsQ: Laravel - Not log in after registration....?
How to remove automatic login after registering? I commented the following line from the Registerusers file: public function register(Request $request) { $validator =…
-
1
votes1
answer1578
viewsQ: Laravel - Save data in the database only if it does not exist and....
I have a person registration system and there is an area with several checkbox fields that represent the social group that the current person represents: TABLES person id | nome 1 | João 2 | Maria 3…
-
1
votes1
answer655
viewsQ: Facebook API - Grab photo(with set size) with other information(name, email, id)?
I need to get the id, name, email, and photo of the person by clicking sign in. I’m doing it so far but you’re in trouble: <script type="text/javascript"> function…
-
3
votes2
answers2143
viewsQ: Laravel - Session and Array
I need to create an array: array( 0 => 0, 1 => 0, 2 => 1, 3 => 0, 4 => 0, 5 => 1, 6 => 0) within a Session: session('session_array') and then individually add and redeem the…
-
1
votes2
answers458
viewsQ: Menu with blocks side by side, a fixed and other fluid
How do I make a horizontal menu with a flowing width on one side and a fixed width on the other side? The menu will not be fixed at the top and needs to work in most browsers(this because I cannot…
-
2
votes1
answer899
viewsQ: Laravel - Test script errors to return certain status to AJAX
In an application in Laravel I have several scripts using ajax. Everyone expects a response from the controller script and, if it returns true, I run a certain function with the 'Success' ajax…
-
0
votes1
answer397
viewsQ: Laravel - How to save checkbox choice in item listing?
In a contact management system, I have a list of items which have a checkbox each (gmail style) so I can select them and use some action related to the selected ones. What is the best way to save…
-
1
votes1
answer182
viewsQ: Laravel - Search if there is a relation in the many-to-many table
I need to search users according to some filter attributes. I have the table contacts: id | nome | email 1 | asd | [email protected] 2 |teste | [email protected] The table groups: id | grupo 1 | grupo1 2…
-
4
votes1
answer664
viewsQ: Use 'WHERE' if value is different from 'NULL' in a search system
I’m trying to make a simple search system with some text fields: $nome = $request->nome; $email = $request->email; $bairro = $request->bairro; $request = Contato::where('nome', 'like',…
-
1
votes1
answer1551
viewsQ: Laravel - List with list of tables (state/city=>person)
I have the following tables: contacts => id - name - state - city states => id - status - acronym cities => id - city - id_state And the following models: Php state. <?php namespace App;…
-
2
votes1
answer563
viewsQ: Laravel - How to Change Default Folder for New Projects
New projects created using the Laravel installer go to C:\Users\MyUser\. For example if I use the command laravel new MyApp Laravel will be installed inside the directory C:\Users\MyUser\MyApp. How…
laravelasked Kelvym Miranda 349