Search Results

Search found 25401 results on 1017 pages for 'adobe partner program'.

Page 119/1017 | < Previous Page | 115 116 117 118 119 120 121 122 123 124 125 126  | Next Page >

  • How do you access the value of an SQL count () query in a Java program

    - by Ankur
    I want to get to the value I am finding using the COUNT command of SQL. Normally I enter the column name I want to access into the getInt() getString() method, what do I do in this case when there is no specific column name. I have used 'AS' in the same manner as is used to alias a table, I am not sure if this is going to work, I would think not. Statement stmt3 = con.createStatement(); ResultSet rs3 = stmt3.executeQuery("SELECT COUNT(*) FROM "+lastTempTable+") AS count"); while(rs3.next()){ count = rs3.getInt("count"); }

    Read the article

  • Memory leak in C++ program.

    - by lampshade
    What I have is a very crude linked list..THe problem for me is that I am getting a memory leak in the constructor or main. I think it is the constructor. I have not yet deleted the eventName varaible that I have allocated memory for. Could someone help please? :/ (This is not a homework question) class Event { private: char * eventName ; string userEvent; struct node { node(); node * nextByName; const char * eventName; }; node * headByName; public: Event(const char * eventName, const Date &myDate); Event(); virtual ~Event(); void insert(const char * eventName, const Date &myDate, const Time &myTime); void setEvent(); const char * const getEvent() const { return userEvent.c_str(); }; void displayByName(ostream& out) const; }; Event::Event(const char * eventName, const Date &myDate) : eventName(new char[strlen(eventName)+1]), headByName(NULL), userEvent("") { if (eventName) { size_t length = strlen(eventName) +1; strcpy_s(this->eventName, length, eventName); } else eventName = NULL; } Event::Event() : eventName(NULL), userEvent(NULL), headByName(NULL) { } Event::~Event() { node * temp_node = NULL; node * current_node = headByName; while ( current_node ) { temp_node = current_node->nextByName; delete current_node; current_node = temp_node; } } void Event::insert(const char * eventName, const Date &myDate, const Time &myTime) // when we insert we dont care about the time, just the name and the date { node * current_node = new node(); if ( headByName == NULL ) { headByName = current_node; headByName->eventName = eventName; } else { node * search_node = headByName; node * prev_node = NULL; while ( search_node != NULL ) { prev_node = search_node; search_node = search_node->nextByName; } if ( NULL == prev_node ) { headByName = current_node; } else { prev_node->nextByName = current_node; } current_node->nextByName = search_node; current_node->eventName = eventName ; } } void Event::displayByName(ostream& out) const { cout << "Scheduled Events are: " << endl << endl; node * current_node = headByName; while ( current_node ) { (char*)eventName = (char*)current_node->eventName; out << eventName << endl; current_node = current_node->nextByName; } } Event::node::node() : nextByName(NULL), eventName(NULL) { } void Event::setEvent() { cout << "\n\nEnter a new event! "; cin.getline((char*)userEvent.c_str(), 256); size_t length = strlen(userEvent.c_str()) +1; strcpy_s((char*)this->userEvent.c_str(), length, userEvent.c_str()); } /********************************************************************************* **********************************************************************************/ int main() { Date * dPtr = new Date("March", 21, 2010); // instaintiate our Date class object by allocating default date paramateres. Event * ePtr = new Event("First Day of Spring", *dPtr); Time * tPtr = new Time(10,12,"PM"); cout << "default Time is: " << tPtr << endl; cout << "default Date is: " << dPtr << endl; ePtr->insert("First Day of Spring",*dPtr, *tPtr); ePtr->insert("Valentines Day", Date("February",14,2010), *tPtr); ePtr->insert("New Years Day", Date("Janurary",1,2011), *tPtr); ePtr->insert("St. Patricks Day", Date("March",17,2010), *tPtr); ePtr->displayByName(cout); ePtr->setEvent(); const char * const theEvent = ePtr->getEvent(); dPtr->setDate(); ePtr->insert(theEvent, *dPtr, *tPtr); tPtr->setTime(); cout << "Your event: " << theEvent << " is scheduled for: " << endl << dPtr << "at" << tPtr; ePtr->displayByName(cout); delete tPtr; delete dPtr; delete ePtr; cin.ignore(); return 0; }

    Read the article

  • Exception in Tab program

    - by Kooper
    Here is main code: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Resources res = getResources(); TabHost tabHost = getTabHost(); Intent intent= new Intent(); intent.setClass(this,EGCQuery.class); tabHost.addTab(tabHost.newTabSpe("egcquery").setIndicator ("EGCQuery", res.getDrawable(R.drawable.egcquery)) .setContent(intent)); tabHost.addTab(tabHost.newTabSpec("patientinfo").setIndicator("PatientInfo", res.getDrawable(R.drawable.patientinfo)) .setContent(R.layout.main2)); tabHost.addTab(tabHost.newTabSpec("compinterp").setIndicator("Comp_Interp", res.getDrawable(R.drawable.compinterp)) .setContent(R.layout.main3)); tabHost.setCurrentTab(0)

    Read the article

  • can not run java program from command line which resides in package

    - by kshitij
    See following code with resides in fillowing directory mypack.pack1 package mypack.pack1; public class myclass { public static void main(String args[]) { System.out.println("KKKKKKKKKKKKKKKKKKKKKKKKKKKKKK"); } } See following screen shot. that is giving error. And i dont want to add anything in class path because i am in particular directory and it has to work. why it is not working.??????

    Read the article

  • How to execute a program from file descriptor?

    - by stribika
    I need to execute a file when I only know the descriptor. It is also possible that there are no links to the file so finding out the name somehow is not an option. All the execve(), execvp(), etc functions take a file name. dlopen() also takes a name. Ugly solutions (like reading the file and calling some function pointer) are OK.

    Read the article

  • What is the rule behind to divide this html in var tip?

    - by metal-gear-solid
    What is the rule behind to divide this html in var tip? var tip = "<p class='adobe-reader-download'>Most computers will open PDF documents automatically, but you may need to download <a title='Link to Adobe website-opens in a new window'"; tip += " href='http://www.adobe.com/products/acrobat/readstep2.html' target='_blank'>Adobe Reader</a>. </p>"; why this cannot be var tip = "<p class='adobe-reader-download'>Most computers will open PDF documents automatically, but you may need to download <a title='Link to Adobe website-opens in a new window' href='http://www.adobe.com/products/acrobat/readstep2.html' target='_blank'> Adobe Reader</a>.</p>"; and how to divide in HTML is longer than this?

    Read the article

  • Static libraries in version-cross-compiled program

    - by Brian Postow
    I have a unix command line app (with big nasty makefile) that I'm trying to run on a mac. I am compiling it on a 10.6 system, with all of the appropriate libraries of course. The deployment environment is a 10.5 system, with no extra libraries. I compiled without -dynamic, and it appears to have static libraries, correctly. When I run it on the 10.6 system, it works. However, when I run it on the 10.5 system, I get: dyld: unknown required load command 0x80000022 I got this same error when I compiled things for the 10.6 system using the 10.5 xcode, so it looks like a version mis-match type problem. However, I used gcc-4.0, and $CFLAGS = -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 so it SHOULD be set up for 10.5... any ideas? thanks Editing an ancient question: I have the exact same problem on a different computer. This time I am at 10.5.8, fully update, the same executable works on 10.6 still. Has anyone had any luck with this in the months since I asked this?

    Read the article

  • I want to write a program to control the square moving by using WINAPI

    - by code_new
    This is the code as attempted so far: #include <windows.h> LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ; int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) { static TCHAR szAppname[] = TEXT ("win0") ; WNDCLASS wndclass ; MSG msg ; HWND hwnd ; wndclass.style = CS_HREDRAW | CS_VREDRAW ; wndclass.cbWndExtra = 0 ; wndclass.cbClsExtra = 0 ; wndclass.lpfnWndProc = WndProc ; wndclass.lpszClassName = szAppname ; wndclass.lpszMenuName = NULL ; wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ; wndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ; wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ; wndclass.hInstance = hInstance ; if (!RegisterClass (&wndclass)) { MessageBox (NULL, TEXT ("Register fail"), szAppname, 0) ; return 0 ; } hwnd = CreateWindow ( szAppname, TEXT ("mywin"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL) ; ShowWindow (hwnd, iCmdShow) ; UpdateWindow (hwnd) ; while (GetMessage (&msg, NULL, 0, 0)) { TranslateMessage (&msg) ; DispatchMessage (&msg) ; } return msg.wParam ; } LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { static int cxClient, cyClient, Left, Top, Right, Down ; PAINTSTRUCT ps ; HDC hdc ; RECT rect ; Right = 20 ; Down = 20 ; switch (message) { case WM_SIZE : cxClient = LOWORD (lParam) ; cyClient = HIWORD (lParam) ; return 0 ; case WM_PAINT : hdc = BeginPaint (hwnd, &ps) ; SetRect (&rect, Left, Top, Right, Down) ; FillRect (hdc, &rect, CreateSolidBrush (RGB (100, 100, 100))) ; EndPaint (hwnd, &ps) ; return 0 ; case WM_KEYDOWN : InvalidateRect (hwnd, &rect, TRUE) ; switch (wParam) { case VK_UP : if (Top - 20 < 0) { Top = 0 ; Down = 20 ; } else { Top -= 20 ; Down -= 20 ; } SendMessage (hwnd, WM_PAINT, wParam, lParam) ; break ; case VK_DOWN : if (Down + 20 > cyClient) { Down = cyClient ; Top = Down - 20 ; } else { Down += 20 ; Top += 20 ; }SendMessage (hwnd, WM_PAINT, wParam, lParam) ; break ; case VK_LEFT : if (Left - 20 < 0) { Left = 0 ; Right = 20 ; } else { Left -= 20 ; Right -= 20 ; }SendMessage (hwnd, WM_PAINT, wParam, lParam) ; break ; case VK_RIGHT : if (Right + 20 > cxClient) { Right = cxClient ; Left = Right - 20 ; } else { Right += 20 ; Left += 20 ; }SendMessage (hwnd, WM_PAINT, wParam, lParam) ; break ; default : break ; } return 0 ; case WM_DESTROY : PostQuitMessage (0) ; return 0 ; } return DefWindowProc (hwnd, message, wParam, lParam); } I considered that I didn't deal the message well, so I can't control it.

    Read the article

  • How to run a program in python?

    - by Luka Mihaldinec
    this is my code. I'm trying to make a script which would run an .exe file from my computer. And this one isn't working :/ I think I'm using the wrong command.. I tried all the other commands like import os, os.startfile, but they won't work too. I think my code is just wrong :P loop=0 while loop==0: answer=raw_input("coded by: Narralol\n\n" "Pick a task:\n" "1) Start Minecraft.exe\n" "2) Start Minecraft_Server.jar\n" "3) Backup your server\n" "4) Copy the backup to your desktop\n" "5) Exit\n") if answer==1: execfile('D:\Games\Minecraft\Minecraft.exe') elif answer==2: execfile('D:\Games\Minecraft\Minecraft_server.jar') elif answer==5: loop=1

    Read the article

  • How would you program Pascal's triangle in R?

    - by Peter Flom
    I am reading, on my own (not for HW) about programming, and one exercise involved programming Pascal's triangle in R. My first idea was to make a list and then append things to it, but that didn't work too well. Then I thought of starting with a vector, and making a list out of that, at the end. Then I thought of making a matrix, and making a list out of that at the end. Not sure which way to even approach this. Any hints? thanks

    Read the article

  • Java program runtime error

    - by Sam
    public class BooksTestDrive { public static void main(String[] args) { Books [] myBooks = new Books[3]; int x=0; myBooks[0].title = "The Grapes of Jave"; myBooks[1].title = "The Java Gatsby"; myBooks[2].title = "The Java Cookbook"; myBooks[0].author = "bob"; myBooks[1].author = "sue"; myBooks[2].author = "ian"; while (x < 3) { System.out.print(myBooks[x].title); System.out.print("by"); System.out.println(myBooks[x].author); x = x+1; } } } This code compiles but while runtime, its giving nullpointer exception.

    Read the article

  • Call a JavaScript function in a Google Chrome window from a vb.net program

    - by user1464827
    I am having a real problem with this. I want to know if it is possible to run/call a javascript function in a Google Chrome web browser window from a VB.net application. The scenario is that i want to monitor the pc activity (which i know how to) and then if a certain event is met (for example, high ram usage) then it calls a JavaScript function in a Google Chrome web browser window so the website is updated. Sort of like a bridge. The only bit it need to know is the vb.net code for how to access a chrome window and invoke a javascript function if its possible. I assume i will need to use process handlers? Any help is appreciated.

    Read the article

  • Why does this program require MSVCR80.dll?

    - by Runner
    #include <gtk/gtk.h> int main( int argc, char *argv[] ) { GtkWidget *window; gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_show (window); gtk_main (); return 0; } I tried putting various versions of MSVCR80.dll under the same directory as the generated executable(via cmake),but none matched. Is there a general solution for this kinda problem? UPDATE Some answers recommend install the VS redist,but I'm not sure whether or not it will affect my installed Visual Studio 9, can someone confirm?

    Read the article

  • please help me for performing serch in my program

    - by Abid
    i want to perform searching in my programe.. i have my class in which i have made a function i.e. public DataTable Search() { string SQL = "Select * from Customer where " + mField + " like '%" + mValue + "%'"; DataTable dt = new DataTable(); dt = dm.GetData(SQL); return (dt); } in which i have made setters and getters for mField and mValue.. where dm is the object of class Datamanagement in which i have made a function GetData i.e. public DataTable GetData(string SQL) { SqlCommand command = new SqlCommand(); SqlDataAdapter dbAdapter = new SqlDataAdapter(); DataTable DataTable = new DataTable(); command.Connection = clsConnection.GetConnection(); command.CommandText = SQL; dbAdapter.SelectCommand = command; dbAdapter.Fill(DataTable); return (DataTable); } and behind the search button, i have written.. private void btnfind_Click(object sender, EventArgs e) { //cust is the object of class customer// if (tbCustName.Text != "") { cust.Field="CustName"; cust.Value = tbCustName.Text; } else if (tbAddress.Text != "") { cust.Value = tbAddress.Text; cust.Field="Address"; } else if (tbEmail.Text != "") { cust.Value = tbEmail.Text; cust.Field="Email"; } else if (tbCell.Text != "") { cust.Value = tbCell.Text; cust.Field = "Cell"; } DataTable dt = new DataTable(); dt = cust.Search(); dgCustomer.DataSource = dt; RefreshGrid(); } where my referesh grid fuction does that : private void RefreshGrid() { DataTable dt = new DataTable(); dt = cust.GetCustomers(); dgCustomer.DataSource = dt; } but this is not working.. i dont knw y.. please help..

    Read the article

  • iPhone OpenGLES: Textures are consuming too much memory and the program crashes with signal "0"

    - by CustomAppsMan
    I am not sure what the problem is. My app is running fine on the simulator but when I try to run it on the iPhone it crashes during debugging or without debugging with signal "0". I am using the Texture2D.m and OpenGLES2DView.m from the examples provided by Apple. I profiled the app on the iPhone with Instruments using the Memory tracer from the Library and when the app died the final memory consumed was about 60Mb real and 90+Mb virtual. Is there some other problem or is the iPhone just killing the application because it has consumed too much memory? If you need any information please state it and I will try to provide it. I am creating thousands of textures at load time which is why the memory consumption is so high. Really cant do anything about reducing the number of pics being loaded. I was running before on just UIImage but it was giving me really low frame rates. I read on this site that I should use OpenGLES for higher frame rates. Also sub question is there any way not to use UIImage to load the png file and then use the Texture class provided to create the texture for OpenGLES functions to use it for drawing? Is there some function in OpenGLES which will create a texture straight from a png file?

    Read the article

  • C program - Seg fault, cause of

    - by resonant_fractal
    Running this gives me a seg fault (gcc filename.c -lm), when i enter 6 (int) as a value. Please help me get my head around this. The intended functionality has not yet been implemented, but I need to know why I'm headed into seg faults already. Thanks! #include<stdio.h> #include<math.h> int main (void) { int l = 5; int n, i, tmp, index; char * s[] = {"Sheldon", "Leonard", "Penny", "Raj", "Howard"}; scanf("%d", &n); //Solve Sigma(Ai*2^(i-1)) = (n - k)/l if (n/l <= 1) printf("%s\n", s[n-1]); else { tmp = n; for (i = 1;;) { tmp = tmp - (l * pow(2,i-1)); if (tmp <= 5) { // printf("Breaking\n"); break; } ++i; } printf("Last index = %d\n", i); // ***NOTE*** //Value lies in next array, therefore ++i; index = tmp + pow(2, n-1); printf("%d\n", index); } return 0; }

    Read the article

< Previous Page | 115 116 117 118 119 120 121 122 123 124 125 126  | Next Page >