Search Results

Search found 25 results on 1 pages for 'csharperwithjava'.

Page 1/1 | 1 

  • Unable to extend desktop

    - by CSharperWithJava
    I'm trying to hook up my TV to my computer as a gaming/multimedia center but I'm having troubles setting it up. I have a custom built machine running Windows 7 RC. It has an ATI Radeon 4800 video card with 2 dvi output and 1 S-video output. I have an s-video to composite adapter that connects to my tv. (It's an old TV with only Cable, composite, and s-video connections). I can switch the desktop to my TV without a problem, but I can't duplicate or extend my desktop onto it. I've installed the latest drivers and Catalyst Control Center, but it won't let it work any more readily than Windows would. Any suggestions? Would using an s-video cable instead of the adapter change anything? (The only reason I use the adapter is because it came with the graphics card) (Edit) I installed the latest drivers and I can now duplicate the screen (show on one monitor and on the TV), but I still can't extend the desktop.

    Read the article

  • Unable to extend desktop

    - by CSharperWithJava
    I'm trying to hook up my TV to my computer as a gaming/multimedia center but I'm having troubles setting it up. I have a custom built machine running Windows 7 RC. It has an ATI Radeon 4800 video card with 2 dvi output and 1 S-video output. I have an s-video to composite adapter that connects to my tv. (It's an old TV with only Cable, composite, and s-video connections). I can switch the desktop to my TV without a problem, but I can't duplicate or extend my desktop onto it. I've installed the latest drivers and Catalyst Control Center, but it won't let it work any more readily than Windows would. Any suggestions? Would using an s-video cable instead of the adapter change anything? (The only reason I use the adapter is because it came with the graphics card) (Edit) I installed the latest drivers and I can now duplicate the screen (show on one monitor and on the TV), but I still can't extend the desktop.

    Read the article

  • Ubuntu Connect Button Disabled, cannot connect

    - by CSharperWithJava
    I'm trying to connect to my school network from Ubuntu 12. The network is WPA encrypted and I can connect just fine if the network manager establishes a connection automatically. However, when I get disconnected and try to reconnect a username and password prompt pops up. The credentials are already stored and are autofilled in correctly, but the Connect button is disabled so I can't actually connect to the network. What can I do? The only guess I've found so far is the password is too short and Ubuntu is expecting a full WPA key. I don't administer the school network though so I certainly can't change that.

    Read the article

  • Abort SAX parsing mid-document?

    - by CSharperWithJava
    I'm parsing a very simple XML schema with a SAX parser in Android. An example file would be <Lists> <List name="foo"> <Note title="note 1" .../> <Note title="note 2" .../> </List> <List name="bar"> <Note title="note 3" .../> </List> </Lists> The ... represents more note data as attributes that aren't important to question. I use a SAX parser to parse the document and only implement the startElement and 'endElement' methods of the HandlerBase to handle Note and List nodes. However, In some cases the files can be very large and take some time to process. I'd like to be able to abort the parsing process at any time (i.e. user presses cancel button). The best way I've come up with is to throw an exception from my startElement method when certain conditions are met (i.e. boolean stopParsing is true). Is there a better way to do this? I've always used DOM style parsers, so I don't fully understand the SAX parser. One final note, I'm running this on Android, so I will have the Parser running on a worker thread to keep the UI responsive. If you know how I can kill the thread safely while the parser is running that would answer my question as well.

    Read the article

  • How to get CEdit to scroll properly?

    - by CSharperWithJava
    I have a CEdit control that's used to display a diagnostics output. Sometimes the data overflows the screen size, so naturally I set the Vertical Scroll property to true (MFC dialog editor). But then, when I tried to scroll the text that was in the window before isn't cleared and the new text is written over it. The result is a big mess of everything I have scrolled past. I've looked for a draw background property or something similar that will erase everything in the window while scrolling (before redrawing the new data). Any suggestions?

    Read the article

  • What's a good library for parsing mathematical expressions in java?

    - by CSharperWithJava
    I'm an Android Developer and as part of my next app I will need to evaluate a large variety of user created mathematical expressions and equations. I am looking for a good java library that is lightweight and can evaluate mathematical expressions using user defined variables and constants, trig and exponential functions, etc. I've looked around and Jep seems to be popular, but I would like to hear more suggestions, especially from people who have used these libraries before.

    Read the article

  • How to create expandable FAQ page in HTML?

    - by CSharperWithJava
    I'd like to create an FAQ page for my website that lists all of the questions as hyperlinks. When the link is clicked, the answer for that question should expand out beneath it. The answers need to be hidden by default, and preferably clicking the link toggles the answers' visibility. Any thoughts?

    Read the article

  • How to utilize network for p2p file sharing on Android Platform?

    - by CSharperWithJava
    I'm working on some apps for the android platform and I have two problems that I'm not quite sure how to approach, and both are closely related. How can I send a relatively small data file from one android device to another (preferably over the internet or directly through wireless network)? Is it possible to create a temporary p2p live data stream from one android device to another? An example application would be to stream low-res video from phone A's camera to phone B, or audio. I would much appreciate being pointed in the right direction on either issue (File transfer or real time data transfer).

    Read the article

  • How to send/open email attachments from android app?

    - by CSharperWithJava
    I would like to somehow send a file from my app on one android device to my app on another device. This can be done any which way, and I'm open to suggestions if you can tell me how to send over network or something like that. Currently, I'm looking at sending the file as an email attachment, but I haven't found any good documentation on how to do it. I need two things to accomplish this, be able to send my file (stored on sd card or somewhere on device) as an attachment, and have my app recognized by android as the app to open an attachment with the file extention (.lst). Any thoughts? The files will all be fairly small xml text files if that makes a difference.

    Read the article

  • How can I pass a const array or a variable array to a function in C?

    - by CSharperWithJava
    I have a simple function Bar that uses a set of values from a data set that is passed in in the form of an Array of data structures. The data can come from two sources: a constant initialized array of default values, or a dynamically updated cache. The calling function determines which data is used and should be passed to Bar. Bar doesn't need to edit any of the data and in fact should never do so. How should I declare Bar's data parameter so that I can provide data from either set? union Foo { long _long; int _int; } static const Foo DEFAULTS[8] = {1,10,100,1000,10000,100000,1000000,10000000}; static Foo Cache[8] = {0}; void Bar(Foo* dataSet, int len);//example function prototype Note, this is C, NOT C++ if that makes a difference; Edit Oh, one more thing. When I use the example prototype I get a type qualifier mismatch warning, (because I'm passing a mutable reference to a const array?). What do I have to change for that?

    Read the article

  • Performance difference in for loop condition?

    - by CSharperWithJava
    Hello all, I have a simple question that I am posing mostly for my curiousity. What are the differences between these two lines of code? (in C++) for(int i = 0; i < N, N > 0; i++) for(int i = 0; i < N && N > 0; i++) The selection of the conditions is completely arbitrary, I'm just interested in the differences between , and &&. I'm not a beginner to coding by any means, but I've never bothered with the comma operator. Are there performance/behavior differences or is it purely aesthetic? One last note, I know there are bigger performance fish to fry than a conditional operator, but I'm just curious. Indulge me. Edit Thanks for your answers. It turns out the code that prompted this question had misused the comma operator in the way I've described. I wondered what the difference was and why it wasn't a && operator, but it was just written incorrectly. I didn't think anything was wrong with it because it worked just fine. Thanks for straightening me out.

    Read the article

  • How to insert hyperlink into access database via sql?

    - by CSharperWithJava
    I have a fairly simple MS Access Database that contains some metadata about a bunch of documents and a hyperlink field that links to the document on our network drive. However, when I use a SQL INSERT statement to populate the hyperlink field, the value I give it only becomes the display text, not the actual link. How can I make the value a functional hyperlink? I'd think that the hyperlink data type would actually create hyperlinks. I'm using Access 2002 SP3.

    Read the article

  • Code Golf: Counting XML elements in file on Android

    - by CSharperWithJava
    Take a simple XML file formatted like this: <Lists> <List> <Note/> ... <Note/> </List> <List> <Note/> ... <Note/> </List> </Lists> Each node has some attributes that actually hold the data of the file. I need a very quick way to count the number of each type of element, (List and Note). Lists is simply the root and doesn't matter. I can do this with a simple string search or something similar, but I need to make this as fast as possible. Design Parameters: Must be in java (Android application). Must AVOID allocating memory as much as possible. Must return the total number of Note elements and the number of List elements in the file, regardless of location in file. Number of Lists will typically be small (1-4), and number of notes can potentially be very large (upwards of 1000, typically 100) per file. I look forward to your suggestions.

    Read the article

  • Algorithm to pick values from set to match target value?

    - by CSharperWithJava
    I have a fixed array of constant integer values about 300 items long (Set A). The goal of the algorithm is to pick two numbers (X and Y) from this array that fit several criteria based on input R. Formal requirement: Pick values X and Y from set A such that the expression X*Y/(X+Y) is as close as possible to R. That's all there is to it. I need a simple algorithm that will do that. Additional info: The Set A can be ordered or stored in any way, it will be hard coded eventually. Also, with a little bit of math, it can be shown that the best Y for a given X is the closest value in Set A to the expression X*R/(X-R). Also, X and Y will always be greater than R From this, I get a simple iterative algorithm that works ok: int minX = 100000000; int minY = 100000000; foreach X in A if(X<=R) continue; else Y=X*R/(X-R) Y=FindNearestIn(A, Y);//do search to find closest useable Y value in A if( X*Y/(X+Y) < minX*minY/(minX+minY) ) then minX = X; minY = Y; end end end I'm looking for a slightly more elegant approach than this brute force method. Suggestions?

    Read the article

  • Can I query inside a SQLite Transaction?

    - by CSharperWithJava
    I'm using the SQLite3 database system in the Android library. I need to execute a query during a transaction to see if there is a similar entry already there. If there is, I have to perform some other logic and adjustments before I add a new row. Can I execute a query within a transaction and get the result back immediately?

    Read the article

  • How to prevent updating duplicate rows in SQLite Database?

    - by CSharperWithJava
    I'm inserting new rows into a SQLite table, but I don't want to insert duplicate rows. I also don't want to specify every column in the database if possible. I don't even know if this is possible. I should be able to take my values and create a new row with them, but if they duplicate another row they should either overwrite the existing row or do nothing.

    Read the article

  • How to represent a Many-To-Many relationship in XML or other simple file format?

    - by CSharperWithJava
    I have a list management appliaction that stores its data in a many-to-many relationship database. I.E. A note can be in any number of lists, and a list can have any number of notes. I also can export this data to and XML file and import it in another instance of my app for sharing lists between users. However, this is based on a legacy system where the list to note relationship was one-to-many (ideal for XML). Now a note that is in multiple lists is esentially split into two identical rows in the DB and all relation between them is lost. Question: How can I represent this many-to-many relationship in a simple, standard file format? (Preferably XML to maintain backwards compatibility)

    Read the article

  • How to search for closest value in a lookup table?

    - by CSharperWithJava
    I have a simple one dimmensional array of integer values that represent a physical set of part values I have to work with. I then calculate and ideal value mathematically. How could I write an efficient search algorithm that will find the smallest abosulte difference from my ideal value in the array? The array is predetermined and constant, so it can be sorted however I need. Example Lookup array: 100, 152, 256, 282, 300 Searching for an ideal value of 125 would find 100 in the array, whereas 127 would find 152. The actual lookup array will be about 250 items long and never change.

    Read the article

  • Counting XML elements in file on Android

    - by CSharperWithJava
    Take a simple XML file formatted like this: <Lists> <List> <Note/> ... <Note/> </List> <List> <Note/> ... <Note/> </List> </Lists> Each node has some attributes that actually hold the data of the file. I need a very quick way to count the number of each type of element, (List and Note). Lists is simply the root and doesn't matter. I can do this with a simple string search or something similar, but I need to make this as fast as possible. Design Parameters: Must be in java (Android application). Must AVOID allocating memory as much as possible. Must return the total number of Note elements and the number of List elements in the file, regardless of location in file. Number of Lists will typically be small (1-4), and number of notes can potentially be very large (upwards of 1000, typically 100) per file. I look forward to your suggestions.

    Read the article

  • How to add user customized data to database?

    - by CSharperWithJava
    I am trying to design a sqlite database that will store notes. Each of these notes will have common fields like title, due date, details, priority, and completed. In addition though, I would like to add data for more specialized notes like price for shopping list items and author/publisher data for books. I also want to have a few general purpose fields that users can fill with whatever text data they want. How can I design my database table in this case? I could just have a field for each piece of data for every note, but that would waste a lot of fields and I'd like to have other options and suggestions.

    Read the article

  • How to merge existing row with new data in SQLite?

    - by CSharperWithJava
    I have a database full of simple note data, with columns for title, due date, priority, and details. There is also a _id column PRIMARY KEY int. Say I have a note in the table already with some data filled and the rest null. I also have a set of data that will fill all those fields. Is there a way that I can only write data to the fields that are NULL? I can't overwrite existing data, but I'd like to add data to NULL columns. I know the rowId of the target row. If my target row had rowId of 5, I could do something like this: UPDATE SET duedate='some date', priority='2', details='some text' WHERE _id=5 But that would overwrite all the data in that row, and I don't want to lose any data that might be there. How can I change this statement to avoid writing to non-null fields?

    Read the article

  • Do null SQLite Data fields take up extra memory?

    - by CSharperWithJava
    I'm using the built in sqlite library on the Android platform. I'm considering adding several general purpose fields that users will be able to use for their own custom applications, but these fields will be blank most of the time. My question is, how much overhead will these blank fields add to my database? Do null fields even take up per record memory in sqlite? If so, how much? I don't quite understand the inner workings of a sqlite database.

    Read the article

1