All Questions

1
answer

Is it possible to reduce this conditional expression?

In my project I constantly come across this type of conditional expression: if(cliente && cliente.id) { return cliente.id; } else { return ''; } That is, "if there is a client and this client has an id then return the value...
asked on 02.12.2014 / 21:50
1
answer

Problem with javascript open

I'm using the following code snippet: window.open('provas-final.php','height=320, width=320', 'gl'); to open the file "proof-final.php" and in the command itself I am saying the width and height of the window that will open (320px), but whe...
asked on 17.12.2014 / 19:52
2
answers

Why match returns an object - JAVASCRIPT

I've always been one of those who understood the functions and applied, but I want to understand why: var a = "__myseld=ej232;Nome=Alexandre"; var as = a.split(";"); var x = 0; while (x<5) { alert("type of de as(sem match): "...
asked on 07.01.2015 / 13:13
2
answers

Is there any way to debug PHP via the browser console?

Is there any way to debug PHP via the browser console? I sometimes want to debug a value on the system in production, but I do not want the user to notice it. Then I had the idea of using the browser console. You can do something like this...
asked on 06.11.2015 / 14:23
4
answers

Find character in string

How to find the position of a given character, where the string has many of these characters in the same string, eg find the 3rd letter X in the string Y. some way to do this?     
asked on 16.02.2015 / 16:51
4
answers

How to capture elements in a json structure using javascript

I need to get some elements inside a Javascript JSON framework. I can get unit elements like this: alert(response.paymentMethods.CREDIT_CARD.options.MASTERCARD.images.SMALL.path); alert(response.paymentMethods.CREDIT_CARD.options.VISA.images.S...
asked on 04.01.2015 / 18:54
1
answer

Location of main in a project with MVC pattern

Within a MVC default project where main() of the application should be localized? Thinking a little I figured it was in the model, because it contains the most "complex" parts of code, but I'm not sure.     
asked on 25.11.2015 / 12:22
2
answers

How to make LINQ filter for every X months?

Hello, I would like to know the best way to filter a list of objects using LINQ in C #, I have a list of objects called Measurement , each measurement has a Date property, which is the date that was registered. What I want to respond to is:...
asked on 18.01.2016 / 20:00
1
answer

Decrypt virus - vbscript

Option Explicit On Error Resume Next dim rbs309 dim tadjakmnmfrg4460 dim icsnvk206 dim wsmp1276 dim falkal1610 dim rfqgobyeyrp5319 dim gtxhgi5556 dim mll8810 dim qxat8709 dim hgurgqrv3280 dim baknqdo6857 dim cioslu3564 dim sndohhjq1214 dim lwwfai...
asked on 10.12.2015 / 22:30
2
answers

Convert a positive decimal number, negative

I have the following query : Valor1 = '200.000,00'; select Valor1 from TB1 Is there a function that converts a positive number to negative?     
asked on 18.12.2015 / 10:56