What sort of mime type should I be using to email a .avi file from an automated python script? There are specific ones for audio/images, but not video afaik.
Hi,
On the MSDN, I have found following:
public event EventHandler<MyEventArgs> SampleEvent;
public void DemoEvent(string val)
{
// Copy to a temporary variable to be thread-safe.
EventHandler<MyEventArgs> temp = SampleEvent;
if (temp != null)
temp(this, new MyEventArgs(val));
}
I do not understand, "copy to temporary variable", isnt it reference type?
I have an piece of html in a jquery object. When I say $(this).html() I get:
<span class="value">4</span><span class="type">teaspoons</span>butter
I want to get only the piece of text from this html segment that is not in the spans. in this example, it is butter.
How do I get that?
Thanks!
So I know that C++ is strongly typed and was just wondering if there was any library (or any thing for that fact of the matter) that would allow you to make a variable that has no initial specific type like var in Python.
In my MSI package I need to set user rights to a directory using cacls.exe. It works fine in an NTFS environment but fails when run on a Fat32 file system. Is there a method to determine the type of file system of the drive the software is installed to?
I'm using WiX 3 to create my MSI package but any hint pointing to the MSI database would help as well.
Many thanks in advance.
C# / .net framework
What is the most reliable way to determine whether a class (type) is a class provided by the .net framework and not any of my classes or 3rd party library classes.
I have tested some approaches
The namespace, e.g. starting with "System."
The Codebase of the assembly, where the dll is located
All this "feels" a little clumsy though it works.
Question: What is the easiest and most reliable way to determine this?
Let's say I have this (assume the name variable is "receiver"):
if (!(receiver instanceof com.HTMLReceiver)) {
throw new com.IllegalArgumentException(
name + " is not an instance of com.HTMLReceiver.");
}
I'd like to factor this code out into a common method so I could call it like this:
Helper.checkInstance(receiver, "com.HTMLReceiver");
But I don't know of a way to convert the com.HTMLReceiver from a string to its actual type so I can use instanceof on it.
Is there a way?
i am reading a csv file and i want to store this in datastore, but i am getting string from file for datetime field.
i want to type cast it to datetime
also same for date and time separately
error::BadValueError: Property HB_Create_Ship_Date must be a datetime
For example:
<input type="text" name="test" onChange="document.formname.test.value=.document.formname.test.value.replace('something','something else')" />
The replace function works but it loses focus on every change
How do you make it not lose focus?
What I'm trying to do is make it so that certain text is immediately replaced with new text when its typed but you can continue typing
How do I create an instance of a "labelled fields data type"?
data InputData = InputData { events :: [Event], newResources :: [Resource] }
myInputData :: InputData
myInputData = ???
Does anybody else have this same problem, when you import data from Excel file to MSSQL Server 2005, if some column contains mostly numeric data, but even if you set the column type to varchar, the wizard fails to import those fields that fail to parse as numbers?
I'm getting "illegal offset type" error for every iteration of this code. Here's the code in case anyone can help:
$s = array();
for($i=0;$i<20;$i++){
$source = $xml->entry[$i]->source;
$s[$source] += 1;
}
print_r($s)
Any ideas. Thanks in advance.
As a more specific take on this question:
http://stackoverflow.com/questions/2985518/drupal-jquery-1-4-on-specific-pages
How do I check, inside a module, whether or not a node is a certain type to be able to do certain things to the node.
Thanks
I have a situation where i have a class
class Foo
{
Foo Bar()
{
return new Foo();
}
}
Now i wan tot create an interface for it
class IFoo
{
??? Bar();
}
What should be in place of the question marks? Each class should return it's own type, not Foo
Are there any alternatives to stat (which is found on most Unix systems) which can determine the file type? The manpage says that a call to stat is expensive, and I need to call it quite often in my app.
What is the best way to access the low-order and high-order 4 bits of the char type and binding field in the elf symbol struct so that I may compare it to STT_FUNC, STT_OBJECT, STB_LOCAL, etc.?
I have list of variables in an include files which is looks like:
var_1 = "string"
var_2 = "string"
on the main file i need variable created on the fly so i do
' somewhere i have the num variable
Execute("new_var = var_"&num)
Exactly on the execute line i got this error
Microsoft VBScript runtime error '800a01ca'
Variable uses an Automation type not supported in VBScript
Any idea guys?
thanks
hello.
Is there a way to define using typedef integral/float type which implies no aliasng?
something equivalent to (but primitive construct):
template < typename T >
struct restrict { T* __restrict data; };
my list has value such as
m=[['na','1','2']['ka','31','45']['ra','3','5']
d=0
r=2
t=m[d][r]
print t # this is givin number i.e 2
Now when I use this value
u=[]
u=m[t]
I am getting an err msg saying type error list does take str values...
i want to use like this how can i convert that t into a integer??
please suggest..
thanks..
Hi there!
I´m building a website and i need to store somehow some informations that i will use in the whole site depending of the user type logged in.
Example:
1) User XPTO logs in
2) Query DataBase to see where he belongs
3) Store those 2 or 3 fields that i will get in Database in a persistent way to use it in the whole site.
My question is: Whats the best practices to do this?
Best Regards
Is it possible to create objects at runtime based on it's type by calling a method.
What I am trying to achieve is
var
lForm1 : TForm;
lForm2 : TForm;
begin
CreateObjects([lForm1, lForm2]);
// After this call I have the variables initialized and I can use them.
end;
I am getting an error message i.e. Type mismatch: 'EMXWEB_IE_LAUNCH'
Line (1): "' ==============================================================================".
the function is
Option Explicit
Public Function EMXWEB_IE_LAUNCH (dicArguments, sErrMsg)
Dim strVersion
Dim strExeVersion
Dim WshShell
Dim strEMXWebBrowserTitleBarText
Dim ie
Const strFunctionName = "EMXWEB_IE_LAUNCH"
Set ie = CreateObject( "InternetExplorer.Application" )
ie.Navigate "www.google.com"
ie.Visible=True
End Function
Could any one let me know where i am wrong and why i am getting this issue
I'm trying to create a simple Guestbook web service using ASP.NET WebServices.
When trying to serialize a list of objects, I get the following exception:
System.InvalidOperationException: The type of the argument object 'GuestBookService.GuestBookEntry' is not primitive.
How can I fix this error?
Let's say I want to index my shop using Solr Lucene.
I have many types of entities : Products, Product Reviews, Articles
How do I get my Lucene to index those types, but each type with different Schema ?