Is there a way to get a variable name as a string in Javascript? (like NSStringFromSelector in Cocoa)
I would like to do like this:
var myFirstName = 'John';
alert(variablesName(myFirstName) + ":" + myFirstName);
--> myFirstName:John
-- added
I'm trying to connect a browser and another program using JavaScript. I would like to send instance names from a browser to another program for callback method.
In system network preference there are some location names.How to get the current or active network location name and list of all network locations? I guess SystemConfiguration.framework supports this but i didn't get exactly which API to use.Thanks in advance for your answer. RegardsDevara Gudda
Hi,
I am sending tweets to Twitter via Zend_Service_Twitter.
The tweets appear with a note "via API". I want to set the API Source with a different name, is there already a functionality within the Zend Framework to change it?
Or do I need to subclass to get this functionality?
Thanks!
I tried setting up a member name mapping convention so that the source members ending with a "Id" are mapped to destination members without Id. For example
UserId - User
How does one do this? I tried using SourceMemberNameTransformer without success. Also tried using RecognizePostfixes().
this.SourceMemberNameTransformer = s =>
{
return s.Replace("Id", string.Empty);
};
I am attempting to sum over a detail grouping on a specific field in Microsoft Access, and assign that sum to a field in the general grouping. When I try to run the report, I get an "Invalid Column Name" error with the detail field getting the error. Has anyone previously encountered this? If so, any ideas what might be causing it or how to solve it?
Hi all, i want to ask abt Sharpdevelop.
Can i change the control's event name in sharpdevelop ? I want to add "_" like in visual studio.
For Example, button click event in Sharp develop defaulted to Button1Click. can i change to Button1_Click like in visualstudio ?
Thanks.
hi, I need to get a domain name if I have an IP address (e.g. I type 209.85.129.103 and the program should find out that is the Google address)
As far as I've figured out is get the hostname:
IPHostEntry IpToDomainName = Dns.GetHostEntry("209.85.129.103");
string HostName = IpToDomainName.HostName; //it returns "fk-in-f103.1e100.net"
but it's not that I want.
I don't know how to achieve that. Any ideas will be helpful
I am using JPA and I need to make the "tableName" a variable.
In a database, I have many tables, and my code needs to access the table where I specify it to read.
@Entity
@Table(name = "tableName")
public class Database implements Serializable {...............}
Any ideas?
I have group of stored procedures with names like 'somename_%'. Are there any way to delete that SP with one query, forexample
DROP PROCEDURE where name like
'somename_%'
.
If the full path of a file is very long, you can't tell which file is in a given tab. so I'm wondering is there is a way let the tab only disply the file name rather than the full path
of the file, might be convenient in some case. need you help, thanks in advance.
In my website I created a class e.g. Class1.cs in App_Code folder when I am trying to load default page which is using this Class file I am getting the following error
CS0103: The name 'Class1' does not exist in the current context for the code
String something = Class1.item1(text1.Text, text2.Text);
and Class1.cs consists of
protected static string item1(string a, string b)
{
//some action here
return null;
}
Everything works fine in my VS2010 but when I host the website in my server I am getting this issue.
I want to find the token's name passed by augment into a function.
class Norm
{
const STR_NORM = 0;
const INT_NORM = 0;
}
function foo($Arg1, $Arg2 = NULL)
{
getConstName($Arg1); # Should Return STR_NORM;
return $Arg1, $Arg2;
}
echo foo(Norm::STR_NORM);
Is there any way to impalement getConstName via the PHP Reflection API?
I'm trying to pass a table name into my mysql stored procedure to use this sproc to select off of different tables but it's not working...
this is what I"m trying:
CREATE PROCEDURE `usp_SelectFromTables`(
IN TableName varchar(100)
)
BEGIN
SELECT * FROM @TableName;
END
I've also tried it w/o the @ sign and that just tells me that TableName doesn't exist...which I know :)
Is there a way to display the path of the solution in the Visual Studio window's name?
By default it displays (SolutionName) - Microsoft Visual Studio, I would like it to instead show something like (SolutionName) - (PathToSolution) - Microsoft Visual Studio.
The reason behind this is I can have multiple versions of a project checked out at a time (staging and trunk for example) and I'd like a quick way of checking without going through prompts etc.
Hi,
I want to write the utility which will be scheduled task, and will take the list of computer names on domain. After a particular time which will be set in the utility machines with that name get shutdown.
Please share your thoughts on this...
Thanks.
Anjan
When i run a JMS related application, i am encountering the following exception error.
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
We are using Sun Application Server 9.1
Any idea what are we missing?
I already tried adding the following but result still the same
Properties env = new Properties();
env.put("java.naming.factory.initial","com.sun.jndi.cosnaming.CNCtxFactory");
Context ctx = new InitialContext(env);
Given an instance of a class, we can obviously return its name:
trait MixedInClassDiscovery {
val className = this.getClass.getName
}
class AClass extends MixedInClassDiscovery {
...
this.className // returns "AClass"
...
}
But this way uses reflection, once for every instance of AClass. Can the same be done once for every class, instead?
One solution which comes to mind is to mix it into companion objects instead of classes themselves.
I'm trying to figure out how to get the name and parameters of a parent function.
Example:
function foo($a,$b){
bar();
}
function bar(){
// Magic Print
}
foo('hello', 'world');
Output:
foo('hello','world')
Any tips?
How can I ensure the contacts I add to an Outlook distribution list are displayed with both name and email address? These contacts may not exist in any other address book, just the distribution list. Currently they show up just as an email address (in both columns).
Here's roughly the VBA we're using:
Do Until RS.EOF
//here's where we want to inject RS!FirstName, RS!Surname etc
objRecipients.Add RS!Email
objRecipients.Resolve
RS.MoveNext
Loop
Set objDistList = contactsFolder.Items.Add("IPM.DistList")
objDistList.DLName = "Whatever"
objDistList.AddMembers objRecipients
objDistList.Save
etc
hi,
when i try to convert form utf-8 string to NSString like so:
NSString *s = [NSString stringWithUTF8String:"\U0627\U0644\U0641\U0631\U0646"];
NSLog(@"%@", s);
i get the compile error:
incomplete universal character name
note that it sometime just works fine:
NSString *UAE = [NSString stringWithUTF8String:"\U0627\U0644\U0641\U0631\U0646"];
NSLog(@"%@", UAE);
and the output:
????????
so why is that happening? please help.
Hi,
I got the following error when i get containts from file("http://www.otherdomain.com").
file() [function.file]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
The domain server is linux.
How to resolve this problem. Please help me.
Thanks,
I have a "Daily Sales Report" made in SSRS 2008 and setup a email subscription to email as an attached PDF file. Is it possible to change the name of the PDF file to the date emailed?
Hi,
I wonder about dynamically changing of class name in .NET application. For example WindowsForms10.SysTreeView32.app.0.19fd5c7. The last string "19fd5c7" would change, but I don't know what makes it changing. Is it the version, the GUI modification, environment, OS or what?
Thanks.