A user will provide a function with three unknown values: a, b and c. For example:
sin(a+b)+ln(5)*(log(ab)-32/sqrt(abc))
How should I store the function so as to best be able to work with it?
Every time I start apache , it always fails.
The problem is in loadmodulephp5...
The error log:[warn] pid file C:/windows/Apache2/logs/httpd.pid overwritten — Unclean shutdown of previous Apache run?
I tried to delete this file and then start apache.But this file had been created again.
Any solution?
Hi,
I have a custom HTTP Module. I would like to inject the logger using my IoC framework, so I can log errors in the module. However, of course I don't get a constructor, so can't inject it into that. What's the best way to go about this?
If you need the specific IoC container - I'm currently using Windsor, but may soon move to AutoFac.
Thanks
in the following link
http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html#sysvar_innodb_flush_method
it says:Different values of this variable can have a marked effect on InnoDB performance. For example, on some systems where InnoDB data and log files are located on a SAN, it has been found that setting innodb_flush_method to O_DIRECT can degrade performance of simple SELECT statements by a factor of three.
Why O_DIRECT could slow down the select statement?
When using openid I get the following error from stackoverflow:
Unable to log in with your OpenID provider:
Error occurred while sending a direct message or getting the response.
Click your OpenID account provider:
why?
Hello,
i configured log4j for basic purpose usin the conversion pattern :-
log4j.appender.rollingFile.layout.ConversionPattern=%p %t %c - %m%n
But now i want to log the class name from which the error came as well as the username(available in session object) as well as the date and time when that event occurs. How do i do this? What changes do i need to make in format string?
Thanks in advance :)
I am logging errors in my controllers method:
protected override void OnException(ExceptionContext filterContext)
But if I make a type in my view page, or enter a route that doesn't exist, it doesn't seem to log that erorr?
I'm using a richtext box to concatenate a log message.
And it seems I got an error: "the settings of this property is too long"
So is there a size limit ?
Binary search follows Divide and Conquer method where as linear Search doesn't follw.The time complexity of Binary Search in O(log n) but incase of linear search the time complexity is O(n).
Thats way Binary search is having bettr prior than linear search.
But it is true when the list of items is large incase of smaller list linear is best(i.e.- it is only when the Best Case concern)
I'm creating an admin module for my client that gives then access to some administration functionality concerning their content. I'm starting off my adding some permissions in my module by implementing hook_perm:
function mymodule_perm()
{
return array(
'manage projects',
);
}
I can then create my menu by adding to the admin section that already exists:
function mymodule_menu()
{
$items['admin/projects'] = array(
'title' => 'Projects',
'description' => 'Manage your projects.',
'page callback' => 'manage_projects_overview',
'access callback' => 'user_access',
'access arguments' => array('manage projects'),
'type' => MENU_NORMAL_ITEM,
'weight' => -100,
);
$items['admin/projects/add'] = array(
'title' => 'Add project',
'access arguments' => array('manage projects'),
'page callback' => 'mymodule_projects_add',
'type' => MENU_NORMAL_ITEM,
'weight' => 1,
);
return $items;
}
This will add a Projects section to the Administration area with an Add project sub section. All good.
The behavior I want is that my client can only see the Projects section when they log in. I've accomplished this by ticking the "manage projects" permission for authenticated users. Now to give my client actual access to the Administration area I also need to tick "access administration pages" under the "system module" in the users permissions section. This works great, when I log in as my client I can only see the Projects section in the Administration area. There is one thing though, I my Navigation menu shown in the left column I can see the following items:
- Administer
- Projects
- Content management
- Site building
- Site configuration
- User management
I was expecting only the see Administer and Projects, not the other ones. When I click e.g. Content Management I get a Content Management titled page with no options. Same for Site Building, Site Configuration and User Management. What's really odd is that Reports is not being shown which is also a top level Administration section.
Why are these other items, besides my Projects section, being shown and how can I make them stop from appearing if I'm not logged in as administrator?
How do you keep your build version number for a war file ?
in ant, in maven?
is there a way to simplify things?
also, how do you keep your change log? [ie so that version number could tell how newer version changed since the last build] ?
I'm trying to upload a file using "AJAX", process data in the file and then return some of that data to the UI so I can dynamically update the screen.
I'm using the JQuery Ajax Form Plugin, jquery.form.js found at http://jquery.malsup.com/form/ for the javascript and using Django on the back end. The form is being submitted and the processing on the back end is going through without a problem, but when a response is received from the server, my Firefox browser prompts me to download/open a file of type "application/json". The file has the json content that I've been trying to send to the browser.
I don't believe this is an issue with how I'm sending the json as I have a modularized json_wrapper() function that I'm using in multiple places in this same application.
Here is what my form looks after Django templates are applied:
<form method="POST" enctype="multipart/form-data" action="/test_suites/active/upload_results/805/">
<p>
<label for="id_resultfile">Upload File:</label>
<input type="file" id="id_resultfile" name="resultfile">
</p>
</form>
You won't see any submit buttons because I'm calling submit with a button else where and am using ajaxSubmit() from the jquery.form.js plugin.
Here is the controlling javascript code:
function upload_results($dialog_box){
$form = $dialog_box.find("form");
var options = {
type: "POST",
success: function(data){
alert("Hello!!");
},
dataType: "json",
error: function(){
console.log("errors");
},
beforeSubmit: function(formData, jqForm, options){
console.log(formData, jqForm, options);
},
}
$form.submit(function(){
$(this).ajaxSubmit(options);
return false;
});
$form.ajaxSubmit(options);
}
As you can see, I've gotten desperate to see the success callback function work and simply have an alert message created on success. However, we never reach that call. Also, the error function is not called and the beforeSubmit function is executed.
The file that I get back has the following contents:
{"count": 18, "failed": 0, "completed": 18, "success": true, "trasaction_id": "SQEID0.231"}
I use 'success' here to denote whether or not the server was able to run the post command adequately. If it failed the result would look something like:
{"success": false, "message":"<error_message>"}
Your time and help is greatly appreciated. I've spent a few days on this now and would love to move on.
I'm struggling to get a handle on Meteor deps, in order to be specific my use case is:
2) When collection is changed, I want to run a jQuery function on the client side
I think deps are what I'm looking for, but at the moment I have only just used:
Template.templateName.set () ->
return Set.find({})
...in terms of reactivity.
A solution which simply console.log's the collection each time it is changed would be more that enough.
Hi,
I am working in a JSP/Servlet project (J2EE) with Eclipse.
Actually i want to dispaly the current user logged in the page and the localTime.
My JSP of LOG IN worked well but I have no idea how to display the user name in the jsp where he is logged.
Thanks for help.
Hello everyone.
I have a log file containing some Whois entries with relative IP addresses which I want to censor like:
81.190.123.123 in 81.190.xxx.xxx.
Is there a way to make such a conversion and rewrite the file contents without modifying the rest?
Thank you for the help!
I need to log all the function parameters in a dozen functions.
Is there a way to pro grammatically determine all the parameters and their values (or at least their .ToString() value)? Perhaps via reflection?
I was wondering if it is possible to log into a site with the normal login form (take facebook for example) through a proxy server. Once logged in, can a person disconnect from the proxy and use their normal ISP connection to access the members area on the site without logging in again?
Thanks!
I need to allow access to an svn repository using email addresses as the user name. I can log in to the server over ssh no problem by changing the email address "@" to a "$" like so:
ssh [email protected]
Unfortunately, the same does not work for svn+ssh. This gets me nowhere:
svn ls svn+ssh://[email protected]/home/accountname/data/svn/repos
Anyone know how this is usually done?
When I try to install an extension apache resets.
Magento ver. 1.6.2.0
I have all required extensions..curl mcrypt etc.
Windows 7 with wampserver 2.2 mysql 5.5 php 5.3 apache 2.2.21
Whenever I try and install an extension from magento connect it starts saying:
checking on dependencies..then apache restarts with...
Parent: child process exited with status 255 -- Restarting.
being the only thing in the log
I have a scheduled R script running from a windows machine. After it finishes, I wish this script to automatically send an email with some log file attached. Using shell() with some other scripts may be possbile, but I was wondering if there is a better solution within R.
thanks.
Is it possible to check what was written to console or a log file with NUnit? I have some legacy code where the only indication of correctness is the console output, so I want to be able to check that against expected values.
I'm writing a Wordpress plugin, and based on certain circumstances, I want to redirect to a different page, but the redirect never happens. headers_sent() returns false. I'm using the pre_get_posts hook. Here is a small snippet:
function test_redirect()
{
header("Location: http://www.cnn.com/");
}
add_action('pre_get_posts', 'test_redirect');
The redirect never happens, and no errors are reported on the page or in the error log. Why can't I redirect?
I recently set up a local copy of Wordpress, added some content and created a child theme. Then I moved it to my webserver, changed the config file, changed the "localhost" occurences in my SQL file to my online URL. I also changed my database prefix from what I had locally on all tables and in the config file.
Everything works well on the outside. But then as I log-in is get the:
You do not have sufficient permissions to access this page.
Iam building managed custom actions using .net 4.0, but when i package the installer and run it,it fails giving me "assembly is built by newer version" error.
In the install log I can also see that the SfxCA is binding to v2.0 instead of 4.0, how can i configure it so it loads the v 4.0 version
many thanks