How can I store my users' passwords safely?

How can I store my users' passwords safely?

How much more safe is this than plain MD5? I've just started looking into password security. I'm pretty new to PHP.$salt = 'csdnfgksdgojnmfnb';$password = md5($salt.$_POST['password']);$result = mysql_query("SELECT id FROM users

How do I perform the SQL Join equivalent in MongoDB?

How do I perform the SQL Join equivalent in MongoDB?

How do I perform the SQL Join equivalent in MongoDB?For example say you have two collections (users and comments) and I want to pull all the comments with pid=444 along with the user info for each. comments { uid:12345, pid:444, comment="b

Setting environment variables in OS X?

Setting environment variables in OS X?

What is the proper way to modify environment variables like PATH in OSX? I've looked on Google a little bit and found 3 different files to edit: /etc/paths~/.profile~/.tcshrcI don't even have some of these files, and I'm pretty sure that .t

How inject $stateProvider in angular application?

How inject $stateProvider in angular application?

I try to use angular-ui, and try to inject $stateProvider:html

multiple “commands” in a single Sublime Text 2 user keymap shortcut

multiple “commands” in a single Sublime Text 2 user keymap shortcut

Is there a way to have multiple "commands" associated with one shortcut?I have these two shortcuts. First shortcut makes the window on the left larger than the right one (in a 2 column view) and the next shortcut puts the focus on the first

Monitoring used connections on mysql to debug 'too many connections'

Monitoring used connections on mysql to debug 'too many connections'

On LAMP production server I get the 'too many connections' error from MYSQL occasionally, I want to add monitoring to find if the reason is that I exceed the max-connections limit. My question: How can I query from mysql or from mysqladmin

Are there any built in auto-complete input components for Polymer 1.0? [closed]

Are there any built in auto-complete input components for Polymer 1.0? [closed]

I've been muddling around with Polymer 1.0 since its release, and I've hit a use case where a select list just won't be sufficient (too many options to select from). What I really need is an autocomplete textbox.Is there one built-in or pl

Running Play Framework 2.0 on Tomcat?

Running Play Framework 2.0 on Tomcat?

I can't find any information about deploying Play Framework 2.0 on Tomcat, is it even possible? If so, where can I find any info regarding it. 1:Sadly, it is not supported in the Play 2.0 release. Looks like the feature got pushed to 2.1

Ant scp task not working, even with jsch on ant/lib

Ant scp task not working, even with jsch on ant/lib

I need to copy a war file via scp. I have added the jsch-0.1.42.jar to $ANT_HOME/lib but I'm still getting this error: Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found. This looks like one of Ant's o

Is there a way to create custom postfix completions in IntelliJ?

Is there a way to create custom postfix completions in IntelliJ?

I want to be able to make custom postfix completions, but I can't seem to find anywhere to do so and haven't been able to find anything online. Anyone know how? 1:Now you can. I've written a plugin for IDEA that allows you to create you

How to override Git config options by command line parameters?

How to override Git config options by command line parameters?

I want to override certain Git config options (in my case http.proxy) when calling a Git command directly by using command line parameters. Is this possible? 1:Yes, you can pass it with -c, like:git -c http.proxy=someproxy clone https://

Stacked ActionBar tab bar not filling parent

Stacked ActionBar tab bar not filling parent

I'm creating Action Bar navigation tabs, but when the Action Bar is stacked the tabs are not getting the whole width space. I have a foto to illustrate it.Is possible, in this case, giving to each tab 50% of the screen width?Thank youI'm ed

Google Places Autocomplete - Pick first result on Enter key?

Google Places Autocomplete - Pick first result on Enter key?

I'm using a Google Places Autocomplete and I simply want it to select the top item in the results list when the enter key is pressed in the form field and suggestions exist. I know this has been asked before:Google maps Places API V3 autoc

How to check if Angular 2 app is running in production or dev

How to check if Angular 2 app is running in production or dev

This seems an easy one, but I couldn't find any result on SO.So, how do I check if my app is running in production mode or dev mode? 1:You can try this function isDevModeimport { isDevMode } from '@angular/core';...export class AppCompon

Java SE 8 TemporalAccessor.from issues when used with a java.time.Instant object

Java SE 8 TemporalAccessor.from issues when used with a java.time.Instant object

java.time has an Instant class which encapsulates a position (or 'moment') on the timeline. While I understand that this is a seconds/nanoseconds value so not directly related to time zones or times offsets, its toString returns a date and

Is there any difference between React.render() and ReactDOM.render()?

Is there any difference between React.render() and ReactDOM.render()?

I have noticed that some of the places in articles they have used React.render() and some of the places ReactDOM.render(). Is there any specific differences are there between these two? 1:This is a very recent change introduced with 0.14

How to scroll “infinitely” wide view in Android?

How to scroll “infinitely” wide view in Android?

I am pondering the alternatives on how to scroll an "infinite", scale-like, control in android. The simple idea is to redraw the entire view on each scroll movement, but somehow it doesn't seem like the proper way. It is possible to draw th

Backwards compatible PageTransformer

Backwards compatible PageTransformer

I'm trying to animate items in a ViewPager and the PageTransformer fits the bill. I want it to be backwards compatible to Android 2.2 so am using the support v4 library. However... As property animation is only supported as of Android 3.0

free speech recognition engines for iOS?

free speech recognition engines for iOS?

I am looking for some free speech recognition engines to use in my iphone application... can you suggest any? 1:There are a couple of wrappers of the Sphinx speech recognition engine (http://cmusphinx.sourceforge.net/) available for iOS

How to run soapUI tests from Java

How to run soapUI tests from Java

I need to run SoapUI test by Java. Could you please advise me useful links? And I would be happy if you can show me how to load/run tests (code examples).I also found only one link which can be applicable for my project - http://pritikaur23

Retrofitting Windows Event Log to a Delphi 5 app

Retrofitting Windows Event Log to a Delphi 5 app

I'm looking for a (fairly pain-free) means of adding some Windows Application Event-Log support to a small legacy Delphi 5 application. We just want it to log when it starts-up, shuts-down, fails to connect to a database etc. Several of the

AF_NETLINK (netlink) sockets using boost::asio

AF_NETLINK (netlink) sockets using boost::asio

I'm writing multicast client/server application based on this and this; which work great.However, I would also need to do something when the number of active network interfaces in the computer changes, something like what the program in the

JQuery/JS Markdown plugin?

JQuery/JS Markdown plugin?

I'm writing a chat app, and I'd like to add some simple functionality where users use markup to affect text formatting, like bold or italics. I'm envisioning this would be like how it is done on Google Talk or StackOverflow. Does JQuery hav

How to access map generated by leaflet in R

How to access map generated by leaflet in R

Let's say I have a code like this# Install devtools if neededif(!require(devtools)) install.packages("devtools")# view rawif-devtools.R hosted with ❤ by GitHub# Install leaflet packageif(!require(leaflet)) install_github("rstudio/leaflet")l