15,911,848 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Doug Vanderweide (Top 10 by date)
Doug Vanderweide
5-Jan-15 7:34am
View
Since I can't see how you set up sudo, I can't answer. But any time you elevate privileges for the web user to root, you are making a mistake.
Doug Vanderweide
3-Jan-15 10:54am
View
The problem, once again, is that your PHP user does not have sufficient privileges to execute that binary. Your best solution, once again, is to not run this process at all on your Web box, but to build a proxy service that can do this work off the Web server. If you are willing to ignore all common sense and safety and run that job from the command line anyway, either elevate the privileges of the PHP user. (Not root, the PHP user. Which is almost certainly not root.) Or add the PHP user to sudo as a root user for that process. Both of which would be huge mistakes to do. In other words, just build a proxy service for this file conversion, or find some other means to convert your documents. Because what you are trying to do is very, very dangerous. I don't know if I have made that clear so let me say it again: Don't do what you are trying to do. Just don't.
Doug Vanderweide
2-Jan-15 15:54pm
View
See new solution below.
Doug Vanderweide
2-Jan-15 15:41pm
View
You asked for JavaScript. JavaScript uses microtime, which is the Unix epoch in milliseconds. GIYF.
If you don't have access to server-side applications, you can't do what you want.
Doug Vanderweide
2-Jan-15 15:38pm
View
You're logging to console. That's not going to appear in your web browser; it's going to show up in the console, which is some external management tool.
This will pop up three consecutive alert dialogs:
window.onload = function() {
alert("hello");
alert("Remembertobringanumbrella.");
alert("this");
}
Doug Vanderweide
2-Jan-15 15:05pm
View
Yes.
Doug Vanderweide
2-Jan-15 12:59pm
View
The logic you have now won't work.
If what you want is to be able to pass, to a function, arrays of OSes and colors, and get back every match that meets those arrays:
var filterColor = ["red"];
var filterOS = ["android", "ios", "other"];
var filteredProducts = $.grep(products, function(n, i) {
return $.inArray(n.os, filterOS) && $.inArray(n.color, filterColor);
});
filteredProducts is now an array of JSON objects that are red in color, and have an OS of android, ios or other.
Doug Vanderweide
29-Dec-14 16:24pm
View
When you include a Web Service by reference in a .NET project, and it requires authentication, you generally pass the authentication using the System.Net.NetworkCredential class.
http://msdn.microsoft.com/en-us/library/ms154673.aspx
http://msdn.microsoft.com/en-us/library/71b57yke(v=vs.110).aspx
Doug Vanderweide
29-Dec-14 15:06pm
View
Not without knowing what error message you get, no.
Doug Vanderweide
29-Dec-14 15:05pm
View
Yes.
Show More