Quantcast
Channel: User Industrial - Stack Overflow
Browsing all 56 articles
Browse latest View live
↧

How to install mongoDB on windows?

I am trying to test out mongoDB and see if it is anything for me. I downloaded the 32bit windows version, but have no idea on how to continue from now on. I normally use the WAMP services for...

View Article


Catching console.log in node.js?

Is there a way that I can catch eventual console output caused by console.log(...) within node.js to prevent cloggering the terminal whilst unit testing a module? Thanks

View Article


PHP : flatten array - fastest way?

Is there any fast way to flatten an array and select subkeys ('key'&'value' in this case) without running a foreach loop, or is the foreach always the fastest way? Array ( [0] => Array ( [key]...

View Article

Fill a table top-bottom with jQuery?

I have an object at hands, containing an unknown number of properties. Each and every one of these properties, I want to represent as a list item in a table where the elements are spread out either...

View Article

Regular expressions: Matching strings starting with dot (.)?

I am a complete Reg-exp noob, so please bear with me. Tried to google this, but haven't found it yet. What would be an appropriate way of writing a Regular expression matching files starting with a...

View Article


Creating methods to update & save documents with mongoose?

After checking out the official documentation, I am still not sure on how to create methods for use within mongoose to create & update documents. So how can I do this? I have something like this...

View Article

Splitting string by whitespace, without empty elements?

I am trying to explode an string using javascript to pick searchterms, whitespace-separated. However I get empty array elements if a searchterm is ended by a whitespace, as shown below. What should I...

View Article

Limiting node.js's memory usage

I am trying to limit a node.js application from using to much memory and I've found out about the --max-stack-size & --max_executable_size options that are available within V8 to pass when...

View Article


Dates in mongoose?

I know that I can set Date.now as a default value in a mongoose schema, but what other Javascript date types or are all dates automatically converted to mongodb´s standard format - ISOdate? Are there...

View Article


Get mtime of specific file using Bash?

I am well aware of being able to do find myfile.txt -mtime +5 to check if my file is older than 5 days or not. However I would like to fetch mtime in days of myfile.txt and store it into a variable...

View Article

PHP: Get key from array?

I am sure that this is super easy and built-in function in PHP, but I have yet not seen it. Here's what I am doing for the moment: foreach($array as $key => $value) { echo $key; // Would output...

View Article

Sorting multidim array: prioritize if column contains substring, then order...

I am currently creating a sorting method that consists of values from an mysql query. Here's a brief view of the array: Array ( [0] => Array ( ['id'] = 1; ['countries'] = 'EN,CH,SP'; ) [1] =>...

View Article

php: Creating automatic database sharding logic?

I did just come up with the following idea, but I lack the knowledge to say if it is applicable to a production application. We have a web application, built on PHP/mySQL to make it easy. A table in...

View Article


Using SVN alone or in small workgroups - workflow approach?

I have spent some months working on a web application and we're come close to production stage. It's soon time to expand the development group with 1-3 people on this project. I have not too much...

View Article

How to build an available web application

Let's say that we are about to build an web application where high availability is top focus. Our customers are companies, so downtime are equal to loss of revenue for everyone involved. To sum it up,...

View Article


PHP: Check if URL redirects?

I have implemented a function that runs on each page that I want to restrict from non-logged in users. The function automatically redirects the visitor to the login page in the case of he or she is...

View Article

How do I start node.js+supervisor on boot?

After installing and setting up node.js on my development VM running Ubuntu 11.10, I would like supervisor to start automatically on boot, calling and reloading node.js when needed. Below snippet...

View Article


When to implement and extend? [closed]

When should implement or extend be used? What are some real-world examples? Is this correct? Implementing appears to be a way to enforce that certain methods exists in a class, and that these methods...

View Article

Split array into chunks

Let's say that I have an Javascript array looking as following: ["Element 1","Element 2","Element 3",...]; // with close to a hundred elements. What approach would be appropriate to chunk (split) the...

View Article

How can I find input elements which have not been changed in jQuery?

I want to find all form elements, with a specific class, and check if they have been altered or not. The if-statement does its job, but I have no idea to correct the find thingy. Is this in the right...

View Article
Browsing all 56 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>