Is there a way to auto complete a statement in eclipse? If I type
if (condition)
it should, after pressing some key, become
if (condition) {
// putting cursor here
}
Actually I have such a code:
NSString *path = [[NSBundle mainBundle] pathForResource: @"connect" ofType: @"xml"];
NSError *error = nil;
NSString *data = [NSString stringWithContentsOfFile: path
encoding: NSUTF8StringEncoding
error: &error];
NSString *message = [NSString stringWithFormat:data, KEY, COUNTRY_ID];
which reads the connect.xml from resources. But on the formating the string (message) APP quits without displaying any errors. How can I read file.xml from resources to NSString with format?
I have a method like:
public T Get<T>(string key)
{
}
Now say I want to return "hello" if the type is a string, and 110011 if it is type int.
how can I do that?
typeof(T) doesn't seem to work.
I ideally want to do a switch statement, and return something based on the Type of the generic (string/int/long/etc).
Is this possible?
Hi,
I'm a Java developer starting with .Net development using VS.Net 2008. I would love to get the Eclipse style of navigating methods etc by pressing the Ctrl key, hover over a method then click it to got to that method's declaration. Does such a plugin exist for VS.Net 2008?
thanks
In specific time period, when user presses "C" I want it to happen as user presses "Ctrl+C". Actually, whatever key user presses the program should adds Ctrl with it.
DO you know how to do that .NET ?
I've look around for changing KeyEventArgs.KeyData but it cannot be set.
I've got a Registry class and there are a few Registry values that I want to access from within that Registry class. (There is a bit of a calculation with these values so I thought I'd just put all that code right in the Registry Class itself).
So we might have something within our RegistryRoutine.cls like:
Function GetMyValue() as integer
Dim R as new RegistryRoutine
<calculations>
GetMyValue=R.GetRegisetryValue (HKEY, key, value, etc.)
End Function
Hi, I've two tables:
Product:
ProductID
ProductName
StateLog:
StateLogID
ProductID (Foreign Key)
State (bit)
TimeStramp (DateTime)
I need to find the heighest StateLog.TimeStamp for each StateLog.ProductID there have the StateLog.State = 0
Is there any Wordpress API key to integrate with asp.net or any other way to integrate wordpress blog with asp.net?
If yes then how it is work?
Please reply me in brief.
I really appreciate your help.
Thank You.
I have two table
First table
BID Town
1 ABC
2 ABC2
3 ABC
Second Table
PID BID AmountFirst AmountSecond AmountThird Minority
1__ 1___ 1000_____ 1000________ 1000_____ SC
2__ 2___ 2000_____ 1000_______ 2000_____ ST
3__ 3___ 1000____ 1000_______ 1000_______ SC
BID is foreign key in Second table.
I want sum AmountFirst + AmountSecond +AmountThird for individualTown
e.g for ABC town answer should be : 6000 (summation of PID 1 and PID 2)
I want Linq query for this..Please help
Hiya.
I have an Iterator that I use on a HashMap, and i save and load the iterator.
is there a way to get the previous key in the HashMap with Iterator? (java.util.Iterator)
Update
I save it as an attribute in a Red5 connection and then load it back to continue working where i stopped.
Another update
I'm iteratoring through the keyset of the HashMap
Hiya.
I have an Iterator that I use on a hashmap, and i save and load the iterator.
is there a way to get the previous key in the hashmap with Iterator? (Java.Util.Iterator)
update
I save it as an attribute in a Red5 connection and then load it back to continue working where i stopped.
another update
I'm iteratoring through the keyset of the hashmap
Hi SO gurus.
I would like to try to automize some recurrent job when i develop asp.net application.
For example, for each <asp:button> I create, I would like to insert the classical code
onomouseover="...something"
onmouseout=" ..something-again.."
Is there a way to automatically add this code "piece" in vs 2008?
Some key combination to add "pre-ready" piece of code?
Thank you
I never use unitests in my apps . I know that exists many technologies for testing .NET based application. (For example NUnit). Which of this tools more comfortable and more understandable to use. Please can you show the good articles where can I find information about unitests and understand key situation where I must use them?
Hi,
I want to define the background for my application in App.XAML. The background was previously defined in another xaml page,which have multiple Grids inside it like following:
<Grid x:Key="GridGeneric" d:LayoutOverrides="Width, Height">
<Grid.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF00172E" Offset="1"/>
<GradientStop Color="#FF004074" Offset="0.433"/>
<GradientStop Color="#FF081316"/>
<GradientStop Color="#FF001D3F" Offset="0.215"/>
<GradientStop Color="#FF002043" Offset="0.818"/>
<GradientStop Color="#FF003B6C" Offset="0.642"/>
</LinearGradientBrush>
</Grid.Background>
<Grid>
<Grid.Background>
<RadialGradientBrush RadiusY="0.973" GradientOrigin="0.497,-0.276" RadiusX="1.003">
<GradientStop Color="#FFB350EE" Offset="0"/>
<GradientStop Color="#001D3037" Offset="0.847"/>
</RadialGradientBrush>
</Grid.Background>
</Grid>
------
-----
</Grid>
Now I want to place the same in my App.xaml like following:
<Style x:Key="backgroundStyle" TargetType="Grid">
<Setter Property="Background">
<Setter.Value>
<Grid>
<Grid.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF00172E" Offset="1"/>
<GradientStop Color="#FF004074" Offset="0.433"/>
<GradientStop Color="#FF081316"/>
<GradientStop Color="#FF001D3F" Offset="0.215"/>
<GradientStop Color="#FF002043" Offset="0.818"/>
<GradientStop Color="#FF003B6C" Offset="0.642"/>
</LinearGradientBrush>
</Grid.Background>
<Grid>
<Grid.Background>
<RadialGradientBrush RadiusY="0.973" GradientOrigin="0.497,-0.276" RadiusX="1.003">
<GradientStop Color="#FFB350EE" Offset="0"/>
<GradientStop Color="#001D3037" Offset="0.847"/>
</RadialGradientBrush>
</Grid.Background>
</Grid>
---------
---------
</Grid>
</Setter.Value>
</Setter>
</Style>
But While doing this I am getting the following Exception.
I need to generate a string of 7 chars that is based on the id of the row. So knowing the id of the image and a secret key, i should get the generated string.
the string must contain chars from "a" to "z" and numbers from 0 to 9.
I have a dir that contains photos like this
dir/p3/i2/s21/thumb.jpg
the generated string is p3i2s21, then is used to calculate the path of the image.
I have a certain value of date and time say 28-3-2012(date) - 10:36:45(time) . I wish to convert this whole timestamp to nanoseconds with the precision of nanoseconds. As in the user would input the time and date as shown but internally i have to be accurate upto nanoseconds and convert the whole thing to nanoseconds to form a unique key assigned to a specific object created at that particular time.
Could some one please help me with the same..
Hi guyz,
I am working on iphone application which contains HTTP Request and Response.
The format of the response is a key/value format compatible with the Java "Properties" stream format.
I want to store the response into a NSDictionay. Could you suggest me any way to do this?
Thank you.
sangee
Hi everyone,
I'm trying to write a dictionay application on C#. There is a scenarios that user selects a text and press a hot-key, I want to pop-up a quick windows that display the search result of the selected word (just like Lingoes does)
How would I do it in C#?
Thanks in advance
hi,
The key event is not listened by my Flex app. Since it is really simple code, I cannot understand where the problem is...
init() {
stage.addEventListener(KeyboardEvent.KEY_DOWN, escHandler);
}
private function escHandler(event:KeyboardEvent):void {
debugF.text = "ESC pressed";
}
thanks
Hi I have a table that looks like this
id : productid : featureid
and would have the following data:
(1, 1, 16)
(2, 1, 21)
(3, 1, 25)
(4, 2, 16)
(5, 2, 21)
(6, 2, 27)
where featureid is a foreign key to another table.
I need to select products that have both featureids of 16 and 25, in which case productid 1 but not productid 2
Can someone show me an example of how to format this query.
I have a dictionary of values read from 2 fields in a database: a string field and a numeric field. The string field is unique so that is the key of the dictionary.
I can sort on the keys, but how can I sort based on the values?
Note: I have read this post 72899 and probably could change my code to have a list of dictionaries but since I do not really need a list of dictionaries I wanted to know if there a simpler solution.
I have a requirement to implement some kind of dictionary object. Something like MyDict<K,V1, V2). For example if I have a Question as Key(k) then Correct answer is V1 . V2 is user selected answer. Is there a collection that would satisfy this requirement in C#. If I have to design my own type, what interfaces should I implement. ICollection and Ilist ?
NSString string = @"Hardwork";
NSUserDefaults defs111 = [NSUserDefaults standardUserDefaults];
[defs111 setObject:string forKey:@"first_name_textfield"];
Hi,
In my code I'm enable to set this value string for key first_name_textfield.
Why is it,so?