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.
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.
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?
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
Is it possible to have Visual Studio code completion use the System.[Type] instead of the keyword.
Example:
Autocomplete of List<String> myList = completes as:
List<String> myList = new List<string>();
whereas, I want:
List<String> myList = new List<String>():
This isn't the only example, but hopefully shows what I'm looking for.
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!
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?
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 = ???
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.
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'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.
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?
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
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 ?
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
may i know how to use javascript onChange on <input type="file"... so that when user selected files, onchange will call flash to return files size and decide what to do next
2nd. how to use javascript to exclude this check,if browser doesnt have flash feature
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;
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..
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; };
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?