I have some data generated in Matlab that I want to process using Perl. I saved the data from Matlab in a .mat file. Is there any way to read it in Perl?
I have large MQ patch applied in Mercurial. What has happened is I have done qrefresh and included files in my patch that I do not want to include. Is there a way to remove the changes to these file from my patch with out manually editing it? In this case if I was just working without MQ, all I would have to do is hg revert.
Hello,
I learning Objective-C in Linux(Ubuntu), but when i tryed to compile my application that needs the Foundation headers i got an error saying that the file cannot be found, but i have installed the GNUstep development package(gnustep-devel). Here is my code:
// Fraction.h
#import <Foundation/NSObject.h>
@interface Fraction: NSObject {
int numerator;
int denominator;
}
- (void) print;
- (void) setNumerator: (int) n;
- (void) setDenominator: (int) d;
- (void) numerator;
- (void) denominator;
@end
And here is the console log:
ubuntu@eeepc:~$ gcc main.m -o frac -lobjc
In file included from main.m:3:
Fraction.h:2:26: error: objc/NSObject.h: No such file or directory
In file included from main.m:3:
Fraction.h:4: error: cannot find interface declaration for ‘NSObject’, superclass of ‘Fraction’
ubuntu@eeepc:~$
What i need to do?
I've got HyperCard 2.4.1 for my Mac 7.5.5. Then I want to know where I can learn, for free and some books to buy too, but I'm now focusing on the free things.
I've got HyperCard because of the suggestion of S Ben.
I'm now playing with WML and WMLScript, but I'm doing a site that will have some content to download(some txt, doc, bmp, mpg, avi and jpg files), but some of my friends(that never developed in this language, just used the technology on the beginning) said that it's impossible. Then here are my questions:
It's possible?
How to do it?
Remember that I'm using PHP combined with WML.
I'm writing a program to generate some wild visuals. So far I can paint each pixel with a random blue value:
for (y = 0; y < YMAX; y++) {
for (x = 0; x < XMAX; x++) {
b = rand() % 255;
setPixelColor(x,y,r,g,b);
}
}
I'd like to do more than just make blue noise, but I'm not sure where to start (Google isn't helping me much today), so it would be great if you could share anything you know on the subject or some links to related resources.
I'd like some suggestions for online resources (blogs, guides, etc - not forums) to help me become good at designing high performance SQL Server databases that operate with large amounts of data and have heavy loads in terms of data turnover and queries per minute.
Suggestions?
i understand that silverlight has come a long way since its inception, but i have always struggled to find the business need for silverlight. i'd love to hear the advantages and disadvantages of silverlight 4.0 vs modern html5 and javascript libraries like jQuery or ExtJS from some people who are more in the know than i am.
is silverlight the way of the future or a stumbling block on the path to a plugin free web?
Wwhat is your favorite vim color scheme?
I haven't found a great one yet, but what I'd like, in order of priority, are:
Never confuses me. For example:
When matching braces are highlighted, it's easy to see where the cursor is
When I've got two or more tabs open, I can read all the titles and easily tell which one is active (maybe inactive ones look faded out)
Very readable, both for regular code and for highlighting
It would be nice if it was attractive
I found one scheme that was ALMOST perfect (peaksea), but not quite - I couldn't read the titles of non-active tabs. So on a related note: anybody know a clear reference page for tweaking the colors of specific items?
Hey, I'm trying to get an extension to wait for a xml message from another program over an internal port. Just something like waiting for a single UTF-8 string that has something like
I'm interested in using Node.js as a socket server for stream-based communication with tens of thousands of clients. Clients will be sending votes for particular pieces of content, and receiving near-realtime updates of aggregated vote tallies from the server.
The datastore needs to support:
Storing the votes
Summarising the votes in near-realtime
Preventing multiple votes within an arbitrary time period (e.g. clients can only vote once for a piece of content every 1 minute)
Something that already has client libraries for Node.js would be preferable.
For Android, I have a custom view which I fill up with primitive shapes in the onDraw() method.
Coming from a Processing background, I expected the draw method to be called automatically 30 times per second, but its clear that that's not how android views work.
So how should I go about calling this method 30 times per second?
I thought I had an answer to this, but the more I play with it, the more I see it as a design flaw of Powershell.
I would like to drag and drop (or use the Send-To mechanism) to pass multiple files and/or folders as a array to a Powershell script.
Test Script
#Test.ps1
param ( [string[]] $Paths, [string] $ExampleParameter )
"Paths"
$Paths
"args"
$args
I then created a shortcut with the following command line and dragged some files on to it. The files come across as individual parameters which first match the script parameters positionally, with the remainder being placed in the $args array.
Shortcut Attempt 1
powershell.exe -noprofile -noexit -file c:\Test.ps1
I found that I can do this with a wrapper script...
Wrapper Script
#TestWrapper.ps1
& .\Test.ps1 -Paths $args
Shortcut Attempt 2
powershell.exe -noprofile -noexit -file c:\TestWrapper.ps1
Has anyone found a way to do this without the extra script?
I have an open source Java database migration tool (http://www.liquibase.org) which I am considering porting to .Net.
The majority of the tool (at least from a complexity side) is around logic like "if you are adding a primary key and the database is Oracle use this SQL. If database is MySQL use this SQL. If the primary key is named and the database is Postgres use this SQL".
I could fork the Java codebase and covert it (manually and/or automatically), but as updates and bug fixes to the above logic come in I do not want to have to apply it to both versions. What I would like to do is move all that logic into a form that can be compiled and used by both Java and .Net versions naively.
The code I am looking to convert does not contain any advanced library usage (JDBC, System.out, etc) that would vary significantly from Java to .Net, so I don't think that will be an issue (at worst it can be designed around).
So what I am looking for is:
A language in which I can code common parts of my app in and compile it into classes usable by the "standard" languages on the target platform
Does not add any runtime requirements to the system
Nothing so strange that it scares away potential contributors
I know Python and Ruby both have implementations on for the JVM and CLR. How well do they fit my requirements? Has anyone been successful (or unsuccesful) using this technique for cross-platform applications? Are there any gotcha's I need to worry about?
I'm trying to get my C# form to be parented correctly in a third party app, I have the handle to the control that I would like my form parented to but just can't seem to get it to work.
I would like to create my form so that it is part of the MDIClient, handle 005E0ED6. Just like Window 01D7157D.
Is this possible? If so can it be done in C#?
I'm trying to get my C# form to be parented correctly in a third party app, I have the handle to the control that I would like my form parented to but just can't seem to get it to work.
I would like to create my form so that it is part of the MDIClient, handle 005E0ED6. Just like Window 01D7157D.
Is this possible? If so can it be done in C#?
In Haskell (F#, Ocaml, and others), I can do this:
sign x | x > 0 = 1
| x == 0 = 0
| x < 0 = -1
Which calculates the sign of a given integer.
This can concisely express certain logic flows; I've encountered one of these flows in Perl.
Right now what I am doing is
sub frobnicator
{
my $frob = shift;
return "foo" if $frob eq "Foomaticator";
return "bar" if $frob eq "Barmaticator";
croak("Unable to frob legit value: $frob received");
}
Which feels inexpressive and ugly.
This code has to run on Perl 5.8.8, but of course I am interested in more modern techniques as well.
Hello,
Today I got my Apple Newton MessagePad 2000 and then I want to start developing for it. I already downloaded and installed the Newton Toolkit, but where I can learn NewtonScript?
Thanks.
I have a sortable list and an iframe on the same page. What I'm trying to do is define the <iframe> as a Droppable. Everything works with out errors but when I try to drag a sortable item across the Iframe it stops at the edge. ( if I move it slowly it seems works in firefox)
The Iframe is set to DesignMode ="on" so covering it with a transparent element to act as the droppable does not seem applicable here. Anyone know of any other solutions or a better way to handle this?
I'm having trouble finding a list of the changes and bug fixes that have been made in the .Net framework for .Net 4.0. They're not easy to find, but surely they exist somewhere?
Specifically I want to find out what changes and updates have been made for System.Net.HttpWebRequest and System.Net.CookieContainer, as both are quite bugridden in 3.5 and I want to evaluate whether I should write my code for .Net 4.0 or if I should create some custom classes to work around their issues.
I am using the jQuery Cookie plugin (download and demo and source code with comments) to set and read a cookie. I'm developing the page on my local machine.
The following code will successfully set a cookie in FireFox 3, IE 7, and Safari (PC). But if the browser is Google Chrome AND the page is a local file, it does not work.
$.cookie("nameofcookie", cookievalue, {path: "/", expires: 30});
What I know:
The plugin's demo works with Chrome.
If I put my code on a web server (address starting with http://), it works with Chrome.
So the cookie fails only for Google Chrome on local files.
Possible causes:
Google Chrome doesn't accept cookies from web pages on the hard drive (paths like file:///C:/websites/foo.html)
Something in the plugin implentation causes Chrome to reject such cookies
Can anyone confirm this and identify the root cause?
When I'm working on a web page layout, I often use Firefox and Firebug to tweak the CSS until it looks right, then modify my style sheet to match.
Right now, I'm trying to fix something that looks fine in other browsers but wrong in Google Chrome. I have pulled up Chrome's Developer Tools, and can inspect the computed style, but don't see a way to edit values and see the results on my page.
Is there a way to do this?
I'm playing a little bit with WML with PHP, then I want to know what is the equivalent of this on WML:
<form action="upload_file.php" method="post"enctype="multipart/form-data">
<label for="file">File:</label><br />
<input type="file" name="file" id="file" /><br />
<input type="submit" name="submit" value="Submit" />
</form>
I have the following alias in my .aliases:
alias gi grep -i
and I want to look for foo case-insensitively in all the files that have the string bar in their name:
find -name \*bar\* | xargs gi foo
This is what I get:
xargs: gi: No such file or directory
Is there any way to use aliases in xargs, or do I have to use the full version:
find -name \*bar\* | xargs grep -i foo
Note: This is a simple example. Besides gi I have some pretty complicated aliases that I can't expand manually so easily.
Edit: I used tcsh, so please specify if an answer is shell-specific.
I want to display a image using SmallBASIC. For this I've started by searching on the references, then I found a reference for IMAGE, that is like this:
IMAGE #handle, index, x, y [,sx,sy [,w,h]]
Then I found another to open files(OPEN):
OPEN file [FOR {INPUT|OUTPUT|APPEND}] AS #fileN
But I want to know some things:
What image types this function can display?
There is any real example to use IMAGE?