var obj = {},ar = [],nothing=null,empty=undefined,word ='string',headorTail = true;
console.log(typeof obj) //object
console.log(typeof ar)//object
console.log(typeof nothing)//object
console.log(typeof empty)//undefined
console.log(typeof word)//string
console.log(typeof headorTail)//boolean
But how can i get the type of obj,ar,nothing as "object, array,null" - what is the best way to achieve this?
To learn from good examples, what are the best open source Google App Engine applications out there?
I don't care if it is Java or Python based.
Please one app per answer. Feel free to add a link to the live app (if there is) and to the project page.
On Mac OS X there is a very useful "open" command which launches an application suitable for opened file type. Is there some C++/Objective-C function on Mac which does the same?
Note: I know I could launch an "open" process. I'm just not sure if it's the best option.
I read that an SEO best practice is to use lowercase urls. Should I name my asp.net webforms project files lowercase as well? Visual Studio doesn't name default documents in new projects all lowercase. I'm not sure it matters since browsing to http://www.mysite.com/mypage.aspx will still work even if your page is named MyPage.aspx.
Can somebody enlighten me on this?
Note I am not asking for which is the "best" IDE for PHP or anything subjective like that. I want to know which is the most widely used backed by some sort of statistic (something like the W3's stats for browser usage) but for IDE usage amongst PHP developers.
c code
extern "C" __declspec(dllexport) int export(LPCTSTR inputFile, string &msg)
{
msg = "haha"
}
c# code
[DllImport("libXmlEncDll.dll")]
public static extern int XmlDecrypt(StringBuilder inputFile, ref Stringbuilder newMsg)
}
I got an error when I try to retrieve the content of newMsg saying that I'm trying to write to a protected memory area.
What is the best way to retrieve the string from c to c#. Thanks.
I have a WCF service to be load balanced with NLB (Windows Network Load Balancer). So I need a Dictionary object to be synced across all the instances of the WCF service.
What is the best possible way to do this?
I'm not sure what the best way of populating a notification page is. I've been using sessions to populate it with information, but this falls short if the user is blocking cookies. I've considered passing it in HTTP GET variables, but I'm unsure whether it's a good alternative since its length is limited by some browsers.
Which method do you prefer?
This sounds like a really good idea:
Ageing Icons with Freshness App
Unfortunately the "demo" is Mac only. How would you go about replicating this on Windows?
One approach I can think off is to modify the desktop.ini file within each folder. This would require a service that periodically scans some folders and updates the desktop.ini file. Is this the best way?
Is there an IDE for PHP where you can set breakpoints and step into and render a webpage "stepwise"?
And whats the "best" IDE for working with php-code?
I am using estimateRigidTransform with about two vectors of 100 points and is working FINE.
But somehow getAffineTransform doesn't work.
I know that findHomography finds the best matrix using RANSAC and getPerspectiveTransform needs only 4 points.
My question is what happens if I give more inputs in estimateRigidTransform or getAffineTransform?
Does it take only 4 points from input matrix? Or do some kind of RANSAC?
Hi all
I have a text file like below
2 1 2
5 10 13 11 12 14
2 0 1
2 99 2
200 2
1 5
5 1 2 3 4 5
1 0
0 0
I want to read file line by line, and read the umbers from each line. I know how to use the stream to read a fixed field line, but what about the non-fixed line?
Best Regards,
Hi,
As the title says I have a list of Django objects and I want to get a list of primary keys. What is the best way of doing this?
I know I could do
my_list = []
for item in object_list:
my_list.append(item.pk)
but was wondering if there is Django or Python specific way of doing this better.
Thanks
Greetings,
I'm confused as to the best approach to make when consuming REST based web services with .Net. At the moment I'm using the System.net.webclient class. Should I be using Webresponse, webrequest classes in System.Net ?
If I were to use another approach (Other than webclient) what disadvantages / advantages would I gain ?
Thanks,
I need to create a web (or non-web) system where a user can create a template layout with tags and placeholders for elements. They could then add new pages to this template. My system would need to pick up any elements that have changed and create an XML of the tagged content. I was just wondering what would be the best CMS or any other software I could use to implement this?
C doesn't have (to the best of my knowledge) overloading or templates, right? So how can a set of type-agnostic functions with the same name exist in plain ol' C? The usual compile-time trickery would involve a whole bunch of macros, wouldn't it?
In a class method, I can add attributes using the built-in function:
setattr(self, "var_name", value).
If I want to do the same thing within a module, I can do something like:
globals()["var_name"] = value
Is this the best way to do this, or is there a more pythonic solution?
Is there a simple :) and efficient way or reading very large number of rows sequentially using Zend_Db?
Basically I need to process entire table, row by row. Table is large, primary key sequence is not guaranteed(i.e. not an autoincrement, but is UNSIGNED INT).
What's the best way to approach this?
Environment: PHP 5.2, Zend Framework 1.10, MySQL 5.1
we are adding new functionality in our application where in there would be some users posting short comments and on the other side there would be some users monitoring the activity or comments posted by the other users within the same application. my question is, what is the best way of implementing the notification of new comment availability(similar to tweet update notification)?
FYI the application is on .Net 3.5.
If I have an anonymous type created by LINQ
var ans = from r in someList where someCondition(r) select new { r.a, r.b };
What is the best way to create an empty matching collection so I can move elements to the new collection:
var newans = ?
foreach (r in ans) { if (complicated(r) newans.Add(r); }
Is there some way to use Enumerable.Empty<()?
Hello,
I would like to learn how to develop games. What language is best for that? Java? C#? Ruby? ActionScript?
I would like to develop web based games and possibly mobile games, not desktop games.
how do i organize country data (countries, states and cities etc) in mysql?
cause every country has 3 tables: countries, states and cities.
should i have each country in separate set of tables or should i have them all in these 3 tables? if i have all of them in same tables, im afraid that the amount of rows will be huge cause i tend to have a lot of countries!
what is best practice for this?