Search Results

Search found 58 results on 3 pages for 'geting'.

Page 1/3 | 1 2 3  | Next Page >

  • android geting data from sql

    - by sagar
    Hello i m new to android. i wont to connect to sql server for store and get data so so me one can help me sending code of android for do it.. i had tried to do tht with java nd it was workink but now i wont to create a aplication for android my java code is :: import java.sql.*; public class MysqlTest { public static void main (String[] args) { Connection conn = null; try { String userName = "pietro"; //change it to your username String password = "pietro"; //change it to your password String url = "jdbc:mysql://192.168.0.67:3306/registro"; Class.forName("com.mysql.jdbc.Driver").newInstance(); conn = DriverManager.getConnection(url, userName, password); Statement s = (Statement) conn.createStatement(); // code for create a tabel in server s.execute("create table School2 (rolno integer,sub text)"); // code for create a tabel in server s.execute("insert into School2(rolno,sub)values(10,'java')"); //code for add value in tabel s.execute("select rolno,sub from School2");//code for add value in tabel s.close(); System.out.println("Database connection established"); } catch (Exception e) { System.err.println("Cannot connect to database server"); } finally { if (conn != null) { try { conn.close (); System.out.println("Database connection terminated"); } catch (Exception e) { /* ignore close errors */ } } } } }

    Read the article

  • Geting SelectList to MVC view using AJAX/jQuery

    - by Chris
    Hi all. I have a C# MVC application which is populating a dropdown based on a date selected. Once the date is selected I am sending it to an action via AJAX/jQuery. The action gets a list of items to return for that date. Here is where my problem is. I have done it previously where I render a partial view from the action and pass it the SelectList as the model. However, I really just want to do it inline in the original view, so I'm hoping there is some way I can return the SelectList and from there do some magic Javascript/JQuery to put it into a dropdown. Has anybody ever done this before? If so, what do I on the client end after calling the load() to return the SelectList? I've done something like this previously, when I was just returning a string or other value to be rendered as straight text: $("#returnTripRow").load("/Trip.aspx/GetTripsForGivenDate?date=" + escape(selection)); But I'm not sure how to intercept the data and morph it into am Html.DropDown() call, or equivalent. Any ideas? Thanks, Chris

    Read the article

  • I am geting message when i am loading VS

    - by kumar
    when loading up a solution in VS2008 I get: An error was encountered while opening associated documents the last time this solution was loaded. Document load is being skipped during this solution load in order to avoid that error. First time when i open it shout down immediatlym then next time when I open it popups this message box it is not shouting down, once I click any usercotrols or ASPX page it is shutting off again.. How can I find which document is causing the problem? Thanks...

    Read the article

  • RESTEasy - access to web folder for geting image

    - by Trick
    I would like to allow users to access images saved in web folder. For example - I have an image in web root folder "blank.png". But the link http://localhost:8080/myapp/blank.png returns 404 (not found). Adding type to resteasy.media.type.mappings does not work. I am a bit of a newbie in RESTEasy...

    Read the article

  • geting the median of 3 values using sheme car & cdr

    - by kristian Roger
    Hi still stuck with the ugly scheme the problem this time is to get the median of three values (easy) I did all these : (define (med x y z) (car(cdr(x y z))) and it was accepted but when testing it (med 3 4 5) I will get this error Error: attempt to call a non-procedure (2 3 4) and when entering letters inetead of number i got (md x y z) Error: undefined varia y (package user) using somthin else than x y z i got (md d l m) Error: undefined variable d (package user) so what is wronge ?!

    Read the article

  • php: geting ip addres

    - by Syom
    i want to get an ip addres of visitors. could you tell me what element of $_SERVER[] i should use? $_SERVER['HTTP_CLIENT_IP']; $_SERVER['HTTP_X_FORWARDED_FOR']; or $_SERVER['REMOTE_ADDR']; thanks

    Read the article

  • facebook FDT 3.0, asp.net get permission of all thing geting error

    - by AjmeraInfo
    i can't access the facebook application from another account. i can only use my application from my own account. i am use facebook application from http://localhost:81/ so it is any problem. i want one full example of facebook application with do most all thing cover. please lots of post are avaible in stackoverflow but i can't implement on it. please give full example of facebook application devlopment. everythings.... in advance thank you.

    Read the article

  • geting information from Treeview with HierarchicalDataTemplate

    - by lina
    Good day! I have such a template: <common:HierarchicalDataTemplate x:Key="my2ndPlusHierarchicalTemplate" ItemsSource="{Binding Children}"> <StackPanel Margin="0,2,5,2" Orientation="Vertical" Grid.Column="2"> <CheckBox IsTabStop="False" IsChecked="False" Click="ItemCheckbox_Click" Grid.Column="1" /> <TextBlock Text="{Binding Name}" FontSize="16" Foreground="#FF100101" HorizontalAlignment="Left" FontFamily="Verdana" FontWeight="Bold" /> <TextBlock Text="{Binding Description}" FontFamily="Verdana" FontSize="10" HorizontalAlignment="Left" Foreground="#FFA09A9A" FontStyle="Italic" /> <TextBox Width="100" Grid.Column="4" Height="24" LostFocus="TextBox_LostFocus" Name="tbNumber"></TextBox> </StackPanel> </common:HierarchicalDataTemplate> for a Treeview <controls:TreeView x:Name="tvServices" ItemTemplate="{StaticResource myHierarchicalTemplate}" ItemContainerStyle="{StaticResource expandedTreeViewItemStyle}" Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="3" BorderBrush="#FFC1BCBC" FontFamily="Verdana" FontSize="14"> </controls:TreeView> I want to know the Name property of each TextBox in Treeview to make validation of each textbox such as: private void TextBox_LostFocus(object sender, RoutedEventArgs e) { tbNumber.ClearValidationError(); if ((!tbNumber.Text.IsZakazNumberValid()) && (tbNumber.Text != "")) { tbNumber.SetValidation(MyStrings.NumberError); tbNumber.RaiseValidationError(); isValid = false; } else { isValid = true; } } and I wnat to see what check boxes were checked how can I do it?

    Read the article

  • Windows API geting HWND

    - by Stacker
    im developing a piece of software to inset some text in a richedit of another program the code goes like this : atlfe = FindWindowEx(wtlsplitterwindow, 0, "atl:0087d7a8" , null); this is only one line: this works fine , problem is with every release of the program this number ""atl:0087d7a8" changes so i have to use spy++ to get the new one and change it in the code. the question is , is there is any way i can get that number from code? by the way im using C#, vs2010 thanks.

    Read the article

  • replacing Fragment inside onActivityResult() geting error

    - by ajay
    When am lancing camera using Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(intent, CAMERA_REQUEST);) And then we getting callback after taking pic to the onActivityResult(){ //HERE AM CALL ING ANOTHER FRAGMENT FragmentManager fm = getFragmentManager(); fm.beginTransaction().replace( R.id.tab_upload, new uploadingActivty(), "tabId").setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN) .addToBackStack(null).commit(); } Then we getting error as 11-21 16:13:44.316: E/AndroidRuntime(30944): Caused by: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState Any idea?

    Read the article

  • java and mysql geting shortest path from to two points

    - by shaharnakash
    hi i have a mysql database that hold id ,name , oneid , twoid , size 1 1 1 2 4 2 2 1 3 1 3 3 2 1 74 4 4 2 4 2 5 5 2 5 12 6 6 4 2 12 7 7 4 6 74 8 8 4 7 12 9 9 3 5 32 10 10 3 8 22 11 11 5 3 66 12 12 5 6 76 13 13 5 9 33 14 14 6 10 11 15 15 6 7 21 16 16 8 3 12 17 17 8 9 10 18 18 9 8 2 19 19 9 10 72 20 20 10 6 31 21 21 10 7 7 22 22 10 9 18 23 23 7 6 8 i want to do Dijkstra algorithm but i cant get the details right if i got the contents to class Conn id ,name , oneid , twoid , size how do i find the path from oneid 1 to twoid 7 and believe me i triad many Dijkstra algorithms so please dont give me only reference

    Read the article

  • Java Grade Calculator program for class kepp geting the error "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException." [migrated]

    - by user2880621
    this is my first question I've posted. I've used this site to look at other questions to help with similar problems I've had. After some cursory looking I couldn't find quite the answer I was looking for so I decided to finally succumb and create an account. I am fairly new to java, only a few weeks into my first class. Anyway, my project is to create a program which takes any amount of students and their grades, and then assign them a letter grade. The catch is, however, that it is on a sort of curve and the other grades' letter are dependent on the the highest. Anything equal to or 10 points below the best grade is an a, anything 11-20 points below is a b, and so on. I am to use an array, but I get this error when ran "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException." I will go ahead and post my code down below. Thanks for any advice you may be able to give. package grade.calculator; import java.util.Scanner; /** * * @author nichol57 */ public class GradeCalculator { /** * @param args the command line arguments */ public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Enter the number of students"); int number = input.nextInt(); double[]grades = new double [number]; for (int J = number; J >=0; J--) { System.out.println("Enter the students' grades"); grades[J] = input.nextDouble(); } double best = grades[0]; for (int J = 1; J < number; J++) { if (grades[J] >= best){ best = grades[J]; } } for (int J = 0;J < number; J++){ if (grades[J] >= best - 10){ System.out.println("Student " + J + " score is " + grades[J] + " and grade is " + "A"); } else if (grades[J] >= best - 20){ System.out.println("Student " + J + " score is " + grades[J] + " and grade is " + "B"); } else if (grades[J] >= best - 30) { System.out.println("Student " + J + " score is " + grades[J] + " and grade is " + "C"); } else if (grades[J] >= best - 40) { System.out.println("Student " + J + " score is " + grades[J] + " and grade is " + "D"); } else { System.out.println("Student " + J + " score is " + grades[J] + " and grade is " + "F"); } } // end for loop for output }// end main method }

    Read the article

  • How to rename multiple files by replacing word in file name geting from the shell script variables?

    - by fy6877
    This question like this thread. How to rename multiple files by replacing word in file name? My example is more complex than the above topic. The two variables are $name and $ newname getting from the shell script other location. $name and $ newname may have the unicode words or special symbles like []<?...etc,so could anyone help me to provide a method to add a part of script in shell scrit to solve file name replacing question. BTW,I try to type two kind of commands to change the part of file name, but it can't work. rename.ul '$name' '$newname' /home/fy6877/test/final/* ls /home/fy6877/test/final/|xargs -I$ rename.ul '$name' '$newname' $

    Read the article

  • Problem with anonymouse delegate within foreach

    - by geting
    public Form1() { InitializeComponent(); Collection<Test> tests = new Collection<Test>(); tests.Add(new Test("test1")); tests.Add(new Test("test2")); foreach (Test test in tests) { Button button = new Button(); button.Text = test.name; button.Click+=new EventHandler((object obj, EventArgs arg)=>{ this.CreateTest(test); }); this.flowLayoutPanel1.Controls.Add(button); } } public void CreateTest(Test test) { MessageBox.Show(test.name); } } when i click the button witch text is 'test1', the messagebox will show 'test2',but my expect is 'test1'. So ,would anyone please tell me why or what`s wrong with my code.

    Read the article

  • google data api for youtube

    - by user93796
    i am trying to run the sample program which comes with google data api.I am geting a run time error at following line YouTubeService myService = new YouTubeService("gdataSample-YouTube-1"); erroe is as follows : run: Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/Maps at com.google.gdata.wireformats.AltRegistry.(AltRegistry.java:118) at com.google.gdata.wireformats.AltRegistry.(AltRegistry.java:100) at com.google.gdata.client.Service.(Service.java:532) at YouTubeReadonlyClient.main(YouTubeReadonlyClient.java:713) Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Maps at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 4 more Java Result: 1 BUILD SUCCESSFUL (total time: 0 seconds) I tried both google data api 1.35.0 and 1.35.1 versions and i am geting the same error in both

    Read the article

  • Concerned with footerrow in gridview

    - by ramyatk06
    hi guys, I have following gridview. <asp:GridView ID="gvMarks" runat="server" AutoGenerateColumns="false" DataKeyNames="MarkId" Width="80%" onrowdatabound="gvMarks_RowDataBound" ShowFooter="True" onrowcommand="gvMarks_RowCommand"> <Columns> <asp:TemplateField> <HeaderTemplate> SubjectCode </HeaderTemplate> <FooterTemplate> <asp:DropDownList ID="dlSubjectCode" runat="server" width="100px" AutoPostBack="false"></asp:DropDownList> </FooterTemplate> </asp:TemplateField> <asp:TemplateField> <HeaderTemplate> Mark </HeaderTemplate> <FooterTemplate> <asp:TextBox ID="txtInternalMark" runat="server" ></asp:TextBox> </FooterTemplate> </asp:TemplateField> <asp:TemplateField> <HeaderTemplate> Insert </HeaderTemplate> <FooterTemplate> <asp:LinkButton ID="lnkInsert" runat="server" Text="Insert" CommandName="Insert" ></asp:LinkButton> </FooterTemplate> </asp:TemplateField> </Columns> <FooterStyle BackColor="White" ForeColor="#000066" /> <RowStyle ForeColor="#000066" /> <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" /> <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" /> </asp:GridView> If i enter some value in txtInternalMark,iam not geting its value in code behind.Iam geting the value as "".Iam using following code if (e.CommandName.Equals("Insert")) { TextBox txtInternalMark = (TextBox)gvMarks.FooterRow.FindControl("txtInternalMark"); lblMessage.Text = txtInternalMark .Text; } Can anybody help to get the value of textbox in codebehind.

    Read the article

  • Microsoft SQL for PHP driver

    - by Jonas B
    Hello I am running a W2K3 x64 server with IIS 7 + FastCGI + PHP 5.3 (x64) I have trouble geting the SQL for php driver to work. It seems it doesn't get loaded, but no error is thrown. I've doublechedked the php.ini a multitude of times and I'm pretty sure I use the right version of the sql for php driver (version 1.1 CTP) and sql native client x64 is installed. Any ideas what could be wrong? Thanks

    Read the article

  • Setting correct hostname

    - by Vlad
    Hi, when i type cat /etc/hostname the console show me my ip adress, when i type cat /etc/mailname it shows me my-ip-adress.internetserviceteam.com I have no idea if it's a problem or not, but i was lokking through a lot of postfix install tutorials, and there when typing cat /etc/hostname they were geting their site name. Why do i get just a ip-adress? Maybe i messed up something when i set up my dns and domains with the webmin tool (I did that for the first time in my life)? OS: debian

    Read the article

  • Taglist: Failed to generate tags for macvim [migrated]

    - by Mohit Jain
    When ever I am trying to open a file in my rails project using macVim. I am geting an error Taglist: Failed to generate tags for ....... But it works perfectly in terminal vim. Why its happening? I am a new bie and just installed everything using this dotvim repo. I installed ctags using these commands that I got from this git $ ctags -R --exclude=.git --exclude=log * ctags: illegal option -- R usage: ctags [-BFadtuwvx] [-f tagsfile] file ... #you need to get new ctags, i recommend homebrew but anything will work $ brew install ctags #alias ctags if you used homebrew $ alias ctags="`brew --prefix`/bin/ctags" #try again! ctags -R --exclude=.git --exclude=log * which ctags on terminal returning, same if i do from vim or gvim using ! (bang): /usr/bin/ctags Can anyone help me?

    Read the article

  • Adding new events to be handled by script part without recompilation of c++ source code

    - by paul424
    As in title I want to write an Event system with handling methods written in external script language, that is Angelscript. The AS methods would have acess to game's world modifing API ( which has to be regsitered for Angelscript Machine as the game starts) . I have come to this problem : if we use the Angelsript for rapid prototyping of the game's world behavior , we would like to be able to define new Event Types, without recompiling the main binary. Is that ever possible , don't stick to Angelscript, I think about any possible scripting language. The main thought is this : If there's some really new Event possible to be constructed , we must monitor some information coming from the binary, for example some variable value changing and the Events are just triggered on some conditions on those changes , wer might be monitoring the Creatures HP, by having a function call on each change, there we could define new Events such as Creature hurt, creature killed, creature healed , creature killed and tormented to pieces ( like geting HP very much below 0 ) . Are there any other ideas of constructing new Events at the scripting side ?

    Read the article

  • Convert String to java.util.Date

    - by Vinayak.B
    Hi Folks, I storing the date to SQLite database in the format d-MMM-yyyy,HH:mm:ss aaa And again retrieving it with the same format, the problem now is, I am gettin every thing fine exepth the Hour. Hour I am geting 00 every time, Here the print statement String date--->29-Apr-2010,13:00:14 PM After convrting Date--->1272479414000--Thu Apr 29 00:00:14 GMT+05:30 2010 Please where I am doing wrong. Cheers, Vinayak

    Read the article

  • Getting started on thunderbird extensions

    - by Mike
    Hello there,       I have beein using Tunderbird for many years now and now i am interested in developing some of my own extensions.       I looked over the documentation on their official website but found little suport for getting started at this.       I have some experience with python, perl, php and would like if you can reccomend me some geting started materials, a "hello world" for this would be great Best regards, Mike

    Read the article

1 2 3  | Next Page >