Hi,
If there is a tool for analyzing memory leaks in a c++ COM Object, please provide a link here
If no such tool exist, what would be the best way to handle memory leaks ?
Thank You
Hi,
If there is a tool for analyzing memory leaks in a c++ COM Object, please provide a link here
If no such tool exist, what would be the best way to handle memory leaks ?
Thank You
The following code executes fine in Firefox and Chrome, but gives an error:
'null' is null or not an object
when executed in Internet Explorer.
if (xmlhttp.responseXML != null)
{
var xmlDoc = xmlhttp.responseXML.documentElement ;
var ResultNodes = xmlDoc.getElementsByTagName ("Result") ; <---- error here
if (ResultNodes != null)
{
(I would have thought the line after the one indicated would be more likely to return the error but the debugger says the run-time error is at the line indicated)
Any ideas why?
I have the following Python 2.6 program and YAML definition (using PyYAML):
import yaml
x = yaml.load(
"""
product:
name : 'Product X'
sku : 123
features :
- size : '10x30cm'
weight : '10kg'
"""
)
print type(x)
print x
Which results in the following output:
<type 'dict'>
{'product': {'sku': 123, 'name': 'Product X', 'features': [{'weight': '10kg', 'size': '10x30cm'}]}}
It is possible to create a strongly typed object from x?
I would like to the following:
print x.features(0).size
I am aware that it is possible to create and instance from an existent class, but that is not what I want for this particular scenario.
Hi.
Should we use de java.util.Date object in java?
It has so many Deprecated methods that is a little anoying to have to use a complex method to something that should be so simples.
I am using something stupid to emulate getDate() like:
public static int toDayMonth (Date dt)
{
DateFormat df = new SimpleDateFormat("dd");
String day = df.format(dt);
return Integer.parseInt(day);
}
It has to be better way...
The following code executes fine in Firefox and Chrome, but gives an error:
'null' is null or not an object
when executed in Internet Explorer.
if (xmlhttp.responseXML != null)
{
var xmlDoc = xmlhttp.responseXML.documentElement ;
var ResultNodes = xmlDoc.getElementsByTagName ("Result") ; <---- error here
if (ResultNodes != null)
{
(I would have thought the line after the one indicated would be more likely to return the error but the debugger says the run-time error is at the line indicated)
Any ideas why?
I have this code:
CardView *aCardView = [self prendiCartaDalMazzo];
[aCardView removeFromSuperview];
[self.mieCarte addSubview:aCardView];
when i try to add aCardView as as subview of mieCarte then i get this error:
objc[4800]: FREED(id): message superview sent to freed object=0x393f130
Program received signal: “EXC_BAD_INSTRUCTION”.
Thanks at all can help.
Hi there,
Is there a way to retrieve tables, including alias tables, and columns, including alias columns, from an Apache Torque Criteria object reliably?
I understand that there is methods like: getSelectedColumns, getAsColumns(), getJoins(), etc., but for examples, getJoins() will just return a list of joined tables strings in free text, where one has to use regular expression to extract the needed joined table information out of it.
Thanks in advance!
David
I have a string, 'songchoice'
I want it to become a 'Uri' so I can use with MediaPlayer.create(context, Uri)
Can someone help me to convert songchoice to the Uri?
Thanks,
James
I have some strings which contain the words LIMIT 3, 199 or LIMIT 0, 100.
Basically I want to replace the word LIMIT and everything after it in my string.
How do I do this in PHP? str_replace only replaces an item and the LIMIT text after is dynamic/
So it could be
WHEN JOHN WAS TRYING HIS SQL QUERY, HE FOUND THAT LIMIT, 121
// RETURN WOULD BE
WHEN JOHN WAS TRYING HIS SQL QUERY, HE FOUND THAT
WHEN JOHN TRIED LIMIT 343, 333 HE FOUND
// RETURN WOULD BE
WHEN JOHN TRIED
I want to know if it is possibe to return a view as a JSON object. In my controller I want to do something like the following:
[AcceptVerbs("Post")]
public JsonResult SomeActionMethod()
{
return new JsonResult { Data = new { success = true, view = PartialView("MyPartialView") } };
}
In html:
$.post($(this).attr('action'), $(this).serialize(), function(Data) {
alert(Data.success);
$("#test").replaceWith(Data.view);
});
Any feedback greatly appreciated.
Given the following string in Coldfusion:
ul[0][id]=main1 &ul[0][children][0][id]=child2 &ul[0][children][0][class]= &ul[1][id]=main3 &ul[2][id]=main4 &ul[3][id]=main5
How can I create an array with the info above?
Thanks
I'm writing a stream to a file and stdout, but I'm getting some kind of encoding like this:
\u05ea\u05e7\u05dc\u05d9\u05d8
\u05e9\u05e1\u05d9\u05de\u05dc
\u05e9\u05d9\u05e0\u05d5\u05d9
\u05d1\u05e1\u05d2\u05e0\u05d5\u05df
\u05dc\u05d3\u05e2\u05ea\u05d9
\u05d0\u05dd \u05d0\u05e0\u05d9
\u05d6\u05d5\u05db\u05e8
\u05e0\u05db\u05d5\u05df
How can I convert this to a printable string?
how write the script, which menchion the whole word, if it contain the keyword? example: keyword "fun", string - the bird is funny, result - the bird is * funny*. i do the following
$str = "the bird is funny";
$keyword = "fun";
$str = preg_replace("/($keyword)/i","<b>$1</b>",$str);
but it menshions only keyword. the bird is *fun*ny
I'm converting stringto timestamp by using
var timestamp = new Date(month+"/"+day+"/"+year).getTime()/ 1000;
My question is how to set it as UTC timezone before converting to timestamp ?
Any good examples/tutorials of unpacking JSON strings with the C++ JSON_Spirit library?
Something that can traverse a json_spirit::Value object and pretty-print it would be ideal.
I am using SQL Server 2008 & 2005 (Express). I'm trying to extract part of an alpha numeric string from a varchar field.
RIGHT(str_field,3) yields null values but substring(str_field, len(str_field)-2, len(str_field)) gives the right value. left(str_field,7) gives the expected values. What gives? I would have thought that RIGHT(str_field,3) and substring(str_field, len(str_field)-2, len(str_field)) are equivalent expressions.
HI, i want to do this:
orderby = "Nome, Cognome desc";
var timb = time.Timbratures.Include("Anagrafica_Dipendente").Where(p => p.CodDipendente == 1);
if(orderBy != "")
timb = timb.OrderBy(orderBy);
Is there any method for pass a string parameter to Orderby
thanks
How to sort string names in array on ascending order .
I tried sort method but it fails to sort on name basis .
def words = ["orange", "blue", "apple", "violet", "green"]
I need to achieve like this :
["apple", "blue", "green", "orange", "violet" ]
thanks in advance.
Is there a simple way to convert a stringto proper case? E.g. john smith becomes John Smith. I'm not looking for something complicated like John Resig's solution, just (hopefully) some kind of one- or two-liner.
Hi Guys,
considering the following enum:
public enum LeadStatus
{
Cold = 1,
Warm = 2,
Hot = 3,
Quote = 5,
Convert = 6
}
How can I convert the integer value back tostring when I pull the value from a database. I've tried:
DomainModel.LeadStatus status = (DomainModel.LeadStatus)Model.Status;
but all I seem to get is "status = 0"
I'm not sure if this valid C# but hopefully you get the idea. :)
switch (msg.GetType()) {
case ClassA:
// blah
case ClassB:
// blah 2
case ClassC:
// blah 3
}
How would I switch on an object's type but using VB.NET's Select Case?
I'm aware that some might suggest using polymorphism but I'm using a hierarchy of small message classes so that really wouldn't work in my csae.