Hi guys, I have to get linux distro name from python script. There is dist method in platform module:
import platform
platform.dist()
But it returns
>>> platform.dist()
('', '', '')
Under my Arch Linux. Why? How can I get the name.
p.s. I have to check whether the distro is debian-based.
Hey,
I need to dynamically set the sproc name of a Linq to SQL query and can't figure out how. I see in the dbml designer that the sproc name is an attribute but it must be a constant, so I can't set it to a dynamic value. Please help.
Thanks,
Justin
I managed to get oauth token and Token secret from google, after the user login and grant access to the web site.
after that I want the user's ID, first name, last name, and other available information about login user's.
How can I achieve it.
Thanks in advance.
browsing some html code I find a text input coded as:
<input type="text" name="Email<%=orderRow.ID %>_<%=i %>" class="{email: true}" />
but need help understanding what's happening with the class declaration. It's not part of hte .net-ness of the page, right - lack of '<%' and '%' is telling me that. But I haven't seen an object used in a class name before.
thx
Hi i couldn't find a single query that would give me in API 2.0 of the contacts API the URI of the contact's image and the display name.
For now as far as i know i can create a uri by having the contact's _ID , but i didn't see any row name that i can use in the projection of Data or Contact to get all that i need.
can anyone help ?
(i refer to using API 2 of the contacts API on android SDK V5 and above )
10x.
I have a variable with the following value
$month = 201002;
the first 4 numbers represent the year, and the last 2 numbers represent the month. I need to get the last 2 numbers in the month string name eg. Feb
My code looks like this
<?php echo date('M',substr($month,4,6)); ?>
I can I go about to obtain the month name
Hi,
I have a datatable with day name column. I want to sort this column by day name e.g. if I have [Friday, Monday,Sunday] sorting should return [Monday ,Friday, Sunday] (ascending) and [Sunday,Friday, Monday] (descending).
I tried to use custom sorting but I wasn't able to represent my custom order.
Do you have ideas ?
Thanks
What exactly means the association name direction (painted as a black triangle near the association name) in UML use case diagram? And what's the difference between it and association direction?
I can get the current action name by using the following code
var currentActionName = ControllerContext.RouteData.GetRequiredString("action");
but is it possible to get the previous action name as well?
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?
Hey, im working on a project and i have to get the name(header text) of selected column in my listbox or textbox from datagridview, when i select any column it shows the name of that column in textbox or listbox.. i'll be very thankful to if you guys kindly help me out in this matter..
im trying to use the code on DataGridViewHeaderClickEvent
"textBox1.Text=dataGridView1.SelectedColumns.ToString();"
Hi.
I need the remote client name (aka computer name) to save it into a database, I was looking into $_SERVER variables but it doesn't exist. How can I get this just using another PHP's function or even javascript if it is necessary.
How can i learn table Name in database an how can i learn any Table's Column name?
SELECT Col.COLUMN_NAME, Col.DATA_TYPE
FROM INFORMATION_SCHEMA.COLUMNS AS Col
LEFT OUTER JOIN INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE AS Usg ON Col.TABLE_NAME = Usg.TABLE_NAME AND Col.COLUMN_NAME = Usg.COLUMN_NAME
LEFT OUTER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS Con ON Usg.CONSTRAINT_NAME = Con.CONSTRAINT_NAME
WHERE Col.TABLE_NAME = 'Addresses_Temp' AND Con.Constraint_TYPE = 'PRIMARY KEY'
But it returns to me empty data:(
I can't seem to find this on google anywhere. I am trying to move to emacs from eclipse but I can't for the life of me figure out how to set my svn author name so it doesn't default the author name OR save the password so I don't have to type it in any each time. I am Ubuntu 8.10 if that matters.
Any insight would be great. Thanks.
File.chown takes an owner ID, a group ID (gid), and a filename. I want to use it to set a file's gid, but what I have is the group name. Is there anything in the standard library that I can use to translate a group name into a gid?
My code looks as below.
try
{
_productRepo.GetAllProductCategories();
}
catch (Exception ex)
{
//Do Something
}
I need a way to show the method name, suppose in the above case if any exception is thrown in the GetAllProductCategories() method, I need to get this method name i.e. "GetAllProductCategories()" as my result. Can any one suggest me how to do this?
I have an application (using SlickGrid) where I need to get the column name or id at any time when user clicks on a cell (this pulls up a menu specific to the data in that column/cell). Grid works fine initially but if the column is moved (drag/drop), the column name/id does not follow the drop but remains mapped to it's initial column position.
Has anyone else seen this and, if so, how did you fix it?
Thanks
Hello all
I have some path "c:\server\folderName1\another name\something\another folder\" .
How i can extract from there the last folder name ?
I have tried several things but they didn't work.
I just don't want to search for the last \ and then to take the rest .
Thanks.
I want to create some mad robust code. I want to take a query as a string, create a temporary view / table to store the results, use it, then drop the table. I want to use a name that is guaranteed to not already exist in the database. Is there an SQL command to generate a unique table name? I'm using postgresql if this is implementation-specific.
I want to extract a user country name from visitors' IP addresses.
I could get the IP address with remote_ip. But what could be
the easiest way to get the country name?
It doesn't have to be super accurate. Any ruby library (gem or plugin) to do this?
I want an simple and easy solution for this.
Hi
i have a problem like this
i have two text boxes(A,B) which i have selected as " Computed when Composed "
when 'A' Login then in Text A Current User Login Name Should come automatically,
if 'B' Login then 'B' user name should come automatically in 'B' Text and it should be saved when i submit the form to the next level
how to do this ?
Regards
Smitha
Hey Folks,
I am trying to Call the webservices in my app and while checking it in console it's showing the number of objects. (as i am using the Mutable array) and then while trying to display the name of the objects (here it's location) it's giving me an error in this line
for (SDZArrayOfLocationWithLatestGrades* location in a) {
NSLog(@" - %@", location.Name); // error here and a is the mutable array
}
PLease help me with this and Happy New Year to All!!!!!!
Thanks,