Posts by Pedro Martins • 77 points
8 posts
-
1
votes1
answer1283
viewsQ: How to take the name of a variable within a method?
I need to access the name of a variable within a method. Example: public class A { public A() { string nameToWrite = "thisdoesntmatter"; B.GetName(nameToWrite); } } public class B { public static…
-
-2
votes2
answers959
viewsA: Check whether mobile or desktop
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { <a href="https://api.whatsapp...>...</a> else <a…
-
0
votes1
answer584
viewsA: Copy code snippet, modify and paste into another Div
A simple way to copy code is by using innerHTML but it would take something outside to catch that bit of code, for example: <div id="copiarConteudo"> <section> <h1> titulo…
-
0
votes2
answers30
viewsA: Send data from a csv to an array
Try it like this: Dim arrName() As String Dim arrValue() As String Using ioReader As New Microsoft.VisualBasic.FileIO.TextFieldParser("C:\test\test.csv") ioReader.TextFieldType =…
vb.netanswered Pedro Martins 77 -
0
votes2
answers1519
viewsA: Validation E-mail’s field
Use regular expressions is probably the best way. You can see a few tests here (taken from Chromium) function validarEmail(email) { var re =…
-
1
votes2
answers26
viewsA: How to remove Divs from an image list with jQuery?
$('img').unwrap(); This should work
-
0
votes1
answer40
viewsA: How to change Toolbar while clicking along a Listview
Try this: final GestureDetector detetor = new GestureDetector(new GestureDetector.SimpleOnGestureListener() { public void onLongPress(MotionEvent e) { Log.e("", "Clique Longo Detetado"); //Adicionas…
-
3
votes1
answer1400
viewsA: Local Storage with React Native
You can use Asyncstorage to store all data types locally. For basic variables you can simply insert in arrows to store var someText = "abc"; await AsyncStorage.setItem('someTextName', someText); to…
react-nativeanswered Pedro Martins 77