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
In Oracle, which clause types get evaluated first? If I had the following ( pretend .... represent valid expressions and relation names ), what would the order of evaluation be?
SELECT ...
FROM .....
WHERE ........
GROUP BY ...........
HAVING .............
ORDER BY ................
I am under the impression that the SELECT clause is evaluated last, but other than that I'm clueless.
I've got a WinForms form that contains an ElementHost control (which contains a WPF UserControl) and a Save button.
In the WPF UserControl I've got a text box with some validation on it. Something like this...
<TextBox Name="txtSomething" ToolTip="{Binding ElementName=txtSomething, Path=(Validation.Errors).[0].ErrorContent}">
<Binding NotifyOnValidationError="True" Path="Something">
<Binding.ValidationRules>
<commonWPF:DecimalRangeRule Max="1" Min="0" />
</Binding.ValidationRules>
</Binding>
</TextBox>
This all works fine. What I want to do however, is disable the Save button while the form is in an invalid state.
Any help would be greatly appreciated.
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.
The uploadify plugin for JQuery seems very good and works for most file types. However, it allows me to upload all file types apart from the ones I need! Namely .WMV, .FLV and .MP4
I have googled the issue and not found anyonw having such difficulties.
I have already tried changing the fileExt parameter and also tried removing it altogether.
I have testing in Google Chrome, IE7 and Firefox and none work for thes efile types.
Is there a known reason for this behaviour?
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 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?
So i am trying to write a program that can read in a java class file as bytecode. For this i am using Data.Binary and Data.ByteStream. The problem i am having is because im pretty new to Haskell i am having trouble actually using these tools.
module Main where
import Data.Binary.Get
import Data.Word
import qualified Data.ByteString.Lazy as S
getBinary :: Get Word8
getBinary = do
a <- getWord8
return (a)
main :: IO ()
main = do
contents <- S.getContents
print (getBinary contents)
This is what i have come up with so far and i fear that its not really even on the right track. Although i know this question is very general i would appreciate some help with what i should be doing with the reading.
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 a form all setup to upload a file and that is working fine. However the way my form is submitted is through AJAX. The button that submits is still a type="submit" in case JS is off.
When I save my form the controller determines whether the IsAjaxRequest is true and if so returns some JSON otherwise it does a RedirectToAction.
When I don't specify a filepath in my input type="file" it considers IsAjaxRequest as true. If there is a filepath set then it thinks that IsAjaxRequest is false. How is it determining that?
My other problem is that when it thinks IsAjaxRequest is false and does a RedirectToAction("Index") I don't actually get sent to the Index view.
Thanks
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#?
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.
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.
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?
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 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?
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'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>
(Similar in spirit to but different in practice from this question.)
Is there any cross-browser-compatible, in-browser technology that allows a high-performance perstistent network connection between a server application and a client written in, say, Javascript? Think XmlHttpRequest on caffeine. I am working on a visualisation system that's restricted to at most a few users at once, and the server is pretty robust, so it can handle as much as it needs to. I would like to allow the client to have access to video streamed from the server at a minimum of about 20 frames per second, regardless of what their graphics hardware capabilities are.
Simply put: is this doable without resorting to Flash or Java?
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?
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.