At first I want to apologize for my poor english.I want to know how to announce int to make sure it's 4 bytes or short in 2 bytes no matter on what platform. Does C99 have rules about this?Thanks:)
I have a MySQL database on my server and I"m pretty sure it's an int over flow on one table with an auto_increment field that's crashing it.
I can delete the table, it's not very important, but I can't get into the server.
Is there anyway to delete that database from the file system or without logging into MySQL?
HELP! THE WORLD IS ENDING!
How does one convert an empty string to an int using Struts2. When the application encounters this parameter with no value, like from an empty text field, it throws the following exception.
java.lang.NoSuchMethodException:
com.XXXXXXXXXXXX.setID([Ljava.lang.String;)
Where ID is an integer, and the URL is:
Something.action?ID=&other=rawr
Is there a way to do this without using an Integer (class)? Do I have to write a type converter?
I am calculating the int equivalent of a given set of bits and storing that in memory. From there, I would like to determine all 1 value bits from the original bitmask. Example:
33 -- [1,6]
97 -- [1,6,7]
Ideas for an implementation in Java?
Does setWidth(int pixels) use device independent pixel or physical pixel as unit?
For example, does setWidth(100) set the a view's width to 100 dips or 100 pxs?
Thanks.
What is the best way to get individual digits from an int with n number of digits for use in a radix sort algorithm? I'm wondering if there is a particularly good way to do it in C/C++, if not what is the general best solution?
I have an int* of rgb data,width, height, and scanlinestride where i would like to create an NSImage.
i have looked around and found that i need to use NSData?
what is the ideal way of doing this?
for(int i = 1;i<100;i++)
string strI = i.tostirng();
in here, if i is 1 then strI is '1'
But I want to get '01'
or '001'
it looks quite easy. but there's only article about datetime.tostring("yyyy-MM-dd") :(
we have a large table (5608782 rows and growing) that has 3 columns Zip1,Zip2, distance
all columns are currently int, we would like to convert this table to use varchars for international usage but need to do a mass import into the new table convert zip < 5 digits to 0 padded varchars 123 becomes 00123 etc. is there a way to do this short of looping over each row and doing the translation programmaticly?
Hi Experts,
I have a list of int values some thing like below (upper bound and lower bounds are dynamic)
1, 2, 3
4, 6, 0
5, 7, 1
I want to calculate the column values in vertical wise like
1 + 4 + 5 = 10
2 + 6 + 7 = 15
3 + 0 + 1 = 4
Expected Result = 10,15,4
Any help would be appreciated
Thanks
Deepu
I want to convert an int to a string but if it is a single digit I want to add a leading 0
Is that one of the built in format options? or do I have to do it manually?
Would (1) int a; new Object[] {a} be the same as (2) new Object[] {new Integer(a)} ?
If I do the 1st one, will (new Object[]{a})[0] give me an Integer?
thank you
Is it possible to constraint a method so that it receives only int, double, long or other numerical types that has the usual numerical operations ( such as +,-,*,/) defined?
Hi,
I begin my NHibernate mapping. In major cases I use int type but for some entities I need to persist million of objets. Is long type for identity will be the best choice ?
Whenever I test my app.. it binds the data from Note class and displays it if it isn't a string. But for the string variables it wont bind. What am I doing wrong?
Inside my main:
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<ListBox x:Name="Listbox" SelectionChanged="listbox_SelectionChanged" ItemsSource="{Binding}">
<ListBox.ItemTemplate>
<DataTemplate>
<Border Width="800" MinHeight="60">
<StackPanel>
<TextBlock x:Name="Title" VerticalAlignment="Center" FontSize="{Binding TextSize}" Text="{Binding Name}"/>
<TextBlock x:Name="Date" VerticalAlignment="Center" FontSize="{Binding TextSize}" Text="{Binding Modified}"/>
</StackPanel>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</Grid>
in code behind:
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
MessageBox.Show("enters onNav Main");
DataContext = null;
DataContext = Settings.NotesList;
Settings.CurrentNoteIndex = -1;
Listbox.SelectedIndex = -1;
if (Settings.NotesList != null)
{
if (Settings.NotesList.Count == 0)
{
Notes.Text = "No Notes";
}
else
{
Notes.Text = "";
}
}
}
and
public static class Settings
{
public static ObservableCollection<Note> NotesList;
static IsolatedStorageSettings settings;
private static int currentNoteIndex;
static Settings()
{
NotesList = new ObservableCollection<Note>();
settings = IsolatedStorageSettings.ApplicationSettings;
MessageBox.Show("enters constructor settings");
}
notes class:
public class Note
{
public DateTimeOffset Modified { get; set; }
public string Title { get; set; }
public string Content { get; set; }
public int TextSize { get; set; }
public Note()
{
MessageBox.Show("enters Note Constructor");
Modified = DateTimeOffset.Now;
Title = "test";
Content = "test";
TextSize = 32;
}
}
ipString is a String representation of an IP address with spaces instead of dots.
String[] ipArray = ipString.split(" ");
String ip = "";
for (String part : ipArray){
if (part != null){
ip += part
}
}
ip = ip.trim();
int ipInt = Integer.parseInt(ip); // Exception is thrown here.
Exception in thread "main" java.lang.NumberFormatException: For input string: "6622015176".
Could someone explain why this exception is being thrown?
hello mates i am trying to store value from dropdown list to an integer but i am getting an exception Input string was not in a correct format.
int experienceYears = Convert.ToInt32("DropDownList1.SelectedValue");
please help.
In C, what is the difference between these two?
float myF = 5.6;
printf( "%i \n", (int)myF ); // gives me "5"
printf( "%ld \n", floor(myF) ); // also "5"?
When is one preferable over the other?
I have a list containing a tuples and long integers the list looks like this:
table = [(1L,), (1L,), (1L,), (2L,), (2L,), (2L,), (3L,), (3L,)]
How do i convert the table to look like a formal list?
so the output would be:
table = ['1','1','1','2','2','2','3','3']
For information purposes the data was obtained from a mysql database.