|
I am trying to get the names of all first level directories under given path.
I tried to use File::Find but had problems.
Can someone help me with that?
Started by Night Walker on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
Okay -type d -eval 'my $slashes = ....
Otherwise it fails.
I would use the following code:
#!perl opendir (DIR"; }
Well, this usually works because my folder names do not contain the dot.
The names of the directories under the root drive F.
|
|
Given a result set, how can I determin the actual names of the fields specified in the query (NOT their aliases).
$query = "SELECT first AS First_Name, last AS Last_Name FROM people"; $dbResult = mysql_query($query); $fieldCount = mysql_num_fields($dbResult...
Answer Snippets (Read the full thread at stackoverflow):
Short ....
So you cannot get the original field names because the server will provide you the information you asked: alias names.
The MySQL gives you it.
I'm not 100% sure about this, but I would say: there is no way .
Column names.
|
|
I'm trying to build a makefile and after about 5 seconds, I get this error: "No files names given". what does it mean and how do I fix it?
[exec] Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland [exec] Error E2266: No file names given [exec...
Started by Everett on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Perhaps a Make variable that is supposed to contain the C++ file names is empty, misspelled.
Looks like you're calling the Borland C++ compiler command without passing it any file names to compile.
|
Ask your Facebook Friends
|
I have DropDownList displays all server present in my network I want to populate the databse names when i changed it into another dropdown I want a LINQ query to get this.
Started by kirankumar on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
On how to get the list of databases available to the logged-in user:
SELECT name FROM sys.sysdatabases WHERE HAS_DBACCESS(name) = 1
Implementing this into LINQ requires you to publish the sysdatabases:
CREATE VIEW [dbo].[vewDatabases] AS....
|
|
I have a list of variable names, like this:
['foo', 'bar', 'baz']
(I originally asked how I convert a list of variables. See Greg Hewgill's answer below.)
How do I convert this to a dictionary where the keys are the variable names (as strings) and the...
Started by Daryl Spitzer on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
The first element in your array has the name foo)) for name in list_of_variable_names)
In addition, if you know, for example, that the variables exist from locals:
dict((name....
About what other names refer to the objects.
|
|
I'm trying to find the correct names for these 2 "types" of coding expressions in LINQ so that I can refer to them correctly. I want to say that the first is called "Fluent Style"?
var selectVar = arrayVar.Select( (a,i) => new { Line = a }); var selectVar...
Started by Guy on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
The name of the second form is "query comprehesion.
In this one, so this one is just plain old linq .
|
|
Anyone have a t-sql function that takes a querystring from a url and returns a table of name/value pairs?
eg I have a value like this stored in my database:
foo=bar;baz=qux;x=y
and I want to produce a 2-column (key and val) table (with 3 rows in this ...
Started by Rory on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Or this answer -- creative hackers will work around these measures, and you'll annoy everyone whose last name is "O'Reilly.
Others have done to parse querystrings into name/value pairs.
|
|
Presuming I have the strings "List" and "Socket," how would I go about creating a List<Socket>?
The answer I need will work just as well for Queue and XmlNodeList, not to mention MyCustomGeneric with MyCustomClass.
Started by Jekke on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Would this answer your question?
http://stackoverflow.com/questions/687363/how-do-i-create-a-generic-class-from-a-string-in-c
Type t=Type.GetType("System.Collections.Generic.List`1[System.Net.Sockets.Socket]"); object o=Activator.CreateInstance(t);.
|
|
M = Model.find(1);
m.class_name would give you "Model"
If we have:
m = Model.find(:all);
How do we get the name of the model from m alone?
Started by kumar on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
This:
Model.find(:all).collect(&:model_name)
This should give you an array of model names of the classes that you.
|
|
Possible Duplicate:
How to programmatically get DLL dependencies
On Windows, in a C++ program, I want to know if a given DLL (I know the path) is loaded by a given external process (I know the path of the exe), using win32 functions. It must be possible...
Started by Fabien on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
There is a nice example provided to list all processes and their names, that you can use as a starting.
|