All Questions

1
answer

Configure locales in PHP

I have the following code: <?php $date = new DateTime($uh->updated_at); echo $date->format('d/M/Y'); ?> I need to generate the date, based on the value of a variable. And that this is generated in Spanish. I tried the foll...
asked on 29.07.2017 / 00:17
2
answers

If you send me a URL in the GET redirect to that URL

As the title of the post says if you send me a url I want to redirect to that url . How would you do it completely? if (isset($_GET["URL"])) { header("Location: public_area.php?url=$actual_link"); }     
asked on 10.02.2016 / 21:59
2
answers

Launch commands from Java

I try to launch a command in Linux with Java with sudo and I can not find the way. I tried the following, but ... even though from the terminal it works, since the execution of my program it does not. public Boolean activarServicio(){...
asked on 30.08.2017 / 21:54
1
answer

Initialize SharedPreferences from a class that does not extend from activity

I am trying to get an app to start automatically when the device is turned on as long as the user wants. To do this, I save the value of a variable using SharedPreference . The problem is that for this I use Read and Save methods, that bei...
asked on 25.07.2017 / 08:21
2
answers

Contraindications to static import?

I'm analyzing a code and I found the class Constantes , which, as its name suggests, has this structure: public final class Constantes { public static final String PREFIJO = "prefijo_"; } In another class I saw this import :...
asked on 11.04.2016 / 13:14
2
answers

Browse folders in python

I have the following code: import os, glob from obspy.core import read for fname in glob.glob('BC.*'): arch=fname.split('.') print "<==== ", fname # Quita la extension (.msd), si existe if(len(arch) > 7): del arc...
asked on 16.02.2016 / 18:55
2
answers

"commit your changes before" after a conflict

I tried to do a git cherry-pick , but it failed with a conflict: $ git cherry-pick master error: could not apply 456190d... Mejoro el post hint: after resolving the conflicts, mark the corrected paths hint: with 'git add <paths>' o...
asked on 19.01.2016 / 00:05
1
answer

"Session has not been configured for this application or request" in AspNet Asynchronous driver vNext

Greetings, I appreciate help with the next issue that is already killing my head. Using AspNet vNext (1.0.0-rc1-update1) I have had problems accessing session data from a controller for WebApi. Randomly (sometimes, sometimes not), this e...
asked on 09.03.2016 / 01:21
4
answers

Filtering Dates and obtaining Dates in java

I have a list of objects and each has a date type calendar . I want to create a filter given two dates that I search for all objects between those dates. I would also like to create a method that calculates me given today's date which i...
asked on 14.01.2016 / 18:07
2
answers

How to put 2 spaces in sublime text 3?

Hello I want that instead of the 4 spaces that sublime text 3 makes me in the indentation when doing tab are only two spaces How can I do this?     
asked on 22.04.2016 / 00:33