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?
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 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?
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.
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! :)
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.
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...
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 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!
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
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 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 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 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 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 .
In the following method,
public void InspectList(IList<int> values)
{
if(values != null)
{
const string format = "Element At {0}";
foreach(int i in values)
{
Log(string.Format(format, i));
}
}
}
Does the use of const provide any benefit over just declaring the string as a string? Woudl it not be interned anyway?
I cannot SSH into my instance - Operation timed out. What could be the reasons why, and what can I do to resolve it? Rebooting normally takes a long time to take effect, and might just makes things worst
UPDATE: It is not about permissions - i can log in normally just fine. I suspect it might be because of memory issues
I have set up Synergy on Unix systems with no problems, however when I set up a Synergy server on a Windows Server 2003 box using I get an error message that the mouse cursor is locked when trying to move to the client system. I use a Microsoft Natural keyboard in case that matters (seems Scroll Lock might be involved). Does anyone have experience with using Synergy on Windows systems that have reported mouse screen locking in the log when unable to mouse over to a client system?
I am tasked to create a web site using Django. It will be a 'sister' site to an existing Plone site. The same Apache instance will be the front end to the sites which allows me to use the same domain name.
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?
Thanks! :)
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
I am looking for a way to direct all the jetty 7 logging to syslog. My current configuration
dumps everything to JETTY_HOME/logs/.. After some initial ivestigation, it seems I should change JETTY_HOME/etc/jetty-logging.xml, but this does not look straightforward. It looks like I should create a new PrintStream implementation which sends its output to syslog and redirecting stderr and stdout to that class in jetty-logging.xml.
any easier way to do that or to make jetty log directly to log4j ?
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?