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 ?
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.
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)
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.
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.
I am tasked to create a web site using joomla. It will be a 'sister' site to an existing joomla site. Both are in the same domain.
However, the owners want the users to be able to log into one and still be logged into the other one.
How can this be accomplished? If it is possible
Thanks in advance! :)
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] ?
Trying to write a deployment script, working on a repo in a different path. The "git-dir" flag seems to work fine for most commands, but not for submodule work. Am I missing a path directive?
Works:
git --git-dir=/tmp/repo_path/.git log
Doesn't work:
git --git-dir=/tmp/repo_path/.git submodule init
Error:
No submodule mapping found in .gitmodules for path 'path_to/submodule'
Much thanks for any help.
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?
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?
Hi,
does anybody have a manuel that describes the steps to create an anonymous
user authentication in SharePoint 2010 (Website for the internet with no authentication).
For editing an admin has to log in
with forms authentication. Can I hold the admin somewhere in the web.config with
membership provider ? Or do I need to install SQL Server somewhere for that task ?
Thanx a lot.
Stephan
I have an ASP.NET WebForms public business site. I want to integrate a discussion forum into my site. However, I don't want people to have to log in twice.
Can someone recommend a ready made discussion forum solution that I can drop into my site, yet be able to customize with my login infrastructure?
I'm using the great (IMHO) jQuery Address plugin but it's been driving me insane since I didn't know that it automatically tracked the pages on Google Analytics.
How do I keep it from doing it?
I tried this but apparently it's never called.
$.address.tracker(function(){console.log("hello")})
I guess I could somehow overwrite the function in the plugin but I hope there's a better way...
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?
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'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.
I have 2 classes, a record and a player. In my main scene, I create an instance of them and play and record. But, as I see, it only records and somehow does not play (the file is not there!)
Here is the code for both :
-(void)record {
NSArray *dirPaths;
NSString *docsDir;
NSString *sound= @"sound0.caf" ;
dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) ;
docsDir = [dirPaths objectAtIndex:0];
NSString *soundFilePath = [docsDir stringByAppendingPathComponent:sound];
NSURL *soundFileURL = [NSURL fileURLWithPath:soundFilePath];
NSDictionary *settings = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithFloat: 44100.0], AVSampleRateKey,
[NSNumber numberWithInt: kAudioFormatAppleLossless], AVFormatIDKey,
[NSNumber numberWithInt: 1], AVNumberOfChannelsKey,
[NSNumber numberWithInt: AVAudioQualityMax],
AVEncoderAudioQualityKey, nil];
NSError *error;
myRecorder = [[AVAudioRecorder alloc] initWithURL:soundFileURL settings:settings error:&error];
if (myRecorder) {
NSLog(@"rec");
[myRecorder prepareToRecord];
myRecorder.meteringEnabled = YES;
[myRecorder record];
} else
NSLog( @"error" );
}
I can see the log of rec.
-(void)play {
NSArray *dirPaths;
NSString *docsDir;
dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
NSUserDomainMask, YES);
docsDir = [dirPaths objectAtIndex:0];
NSString *soundFilePath1 = @"sound0.caf" ;
NSURL *soundFileURL = [NSURL fileURLWithPath:soundFilePath1];
BOOL isMyFileThere = [[NSFileManager defaultManager] fileExistsAtPath:soundFilePath1];
if(isMyFileThere) {
NSLog(@"PLAY");
avPlayer1 = [[AVAudioPlayer alloc] initWithContentsOfURL:soundFileURL error:NULL];
avPlayer1.volume = 8.0;
avPlayer1.delegate = self;
[avPlayer1 play];
}
}
I DONT SEE THE LOG OF PLAY !
I call them both with:
recInst=[recorder alloc]; //to rec
[recInst record];
plyInst=[player alloc]; //play
[plyInst play];
and to stop the recorder:
- (void)stopRecorder {
NSLog(@"stopRecordings");
[myRecorder stop];
//[myRecorder release];
}
What's wrong here? Thanks.
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 have a system where a central Java controller launches analysis processes, which may be written in C++, Java, or Python (mostly they are C++). All these processes currently run on the same server. What are you suggestions to
Create a central log to which all processes can write to
What if in the future I push some processes to another server. How can I support distributed logging?
Thanks!
var r = /\d/g;
var a = r.test("1"); // will be true
var b = r.test("1"); // will be false
console.log(a == b); // will be false
Please explain to me why the result of r.test("1") alternates with each call?
I was able to work around the issue I was having by removing the g modifier. However I would still like to understand why this happens.
I need to find the path of the database (MDF) or at least the database logs loaded but for some reasons I cannot login through the MSSQL server so I need to know if you know any file/config file that keeps the path of the databases or log file .
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.
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?