Daily Archives

Articles indexed Friday May 28 2010

Page 12/107 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • How to output two ddl files at the same time with using maven hbm2ddl plugin

    - by daniel-cai
    Our application needs to use two different kinds of databases.One is oracle, the other is mysql and we want to use maven plugin hbm2ddl to generate the ddl file, and want to output the two ddl files at the same time, I don't know how to set the configuration in pom.xml. I tried to use this plugin twice, but it always generated one ddl file. Any one encountered such case before ? could u please give some advice.

    Read the article

  • Substitute for Iterator that is Serialization

    - by Mahmoud
    I'm working on a GWT project, and I have a bunch of Java classes that use Java Object Iterators on the server side. As I was reading through the internet...Iterators seem to not be serializable preventing me from sending them over to the client side from the server side. My question is is there an efficient way to serialize the iterator or use a substitute that might be serializable ? Many thanks!

    Read the article

  • Win32 select/poll/eof/ANYTHING!?!?!

    - by Andrew
    Using the standard Win32 file I/O API's (CreateFile/ReadFile/etc), I'm trying to wait for a file to become readable, or for an exception to occur on the file. If Windows had any decent POSIX support, I could just do: select(file_count, files_waiting_for_read, NULL, files_waiting_for_excpt, NULL, NULL); And select will return when there's anything interesting on some of the files. Windows doesn't support select or poll. Fine. I figured I could take the file and do something like: while(eof(file_descriptor)) { Sleep(100); } The above loop would exit when more data is available to be read. But nope, Windows doesn't have an equivalent of eof() either! I could possibly call ReadFile() on the file, and determine if it's at the eof that way. But, then I'd have to handle the reading at that point in time -- I'm hoping to simply be able to figure out that a file is readable, without actually reading it. What are my options?

    Read the article

  • Regular Expression - capturing contents of <select>

    - by joey mueller
    I'm trying to use a regular expression to capture the contents of all option values inside an HTML select element For example, in: <select name="test"> <option value="blah">one</option> <option value="mehh">two</option> <option value="rawr">three</option> </select> I'd like to capture one two and three into an array. My current code is var pages = responseDetails.responseText.match(/<select name="page" .+?>(?:\s*<option .+?>([^<]+)<\/option>)+\s*<\/select>/); for (var c = 0; c<pages.length; c++) { alert(pages[c]); } But it only captures the last value, in this case, "three". How can I modify this to capture all of them? Thanks!

    Read the article

  • Building and rendering a bitmap from a double array

    - by Ami
    I'm new to c# and I'm sure I'm missing something simple here. I'm trying to build a bitmap from integer values (0-255) in a double array and then render it in a PictureBox. I think my Bitmap is getting generated but it isn't displaying in my PictureBox. Bitmap bmp = new Bitmap(image_width, image_height); Color pxl_color = new Color(); for (int i = 0; i < image_width; i++) { for (int j = 0; j < image_height; j++) { pxl_color = Color.FromArgb(array_bitmap[i][j]); bmp.SetPixel(i, j, pxl_color); } } PictureBox1.Image = bmp; Thanks in advance.

    Read the article

  • No IO exception reported for socket operation when the interface is removed

    - by user352536
    The wifi network is connected, the application setup a socket connection and exchange data with the remote server. But when turn off the wifi, the inteface is removed, while socket operation read/write on this socket is still like normal, no any IO exception reported. The application has to do some extra checking to avoid waiting for the data forever. Is this the normal case for Android design? Is there any plan to fix it?

    Read the article

  • "Dealing with uncertainty" - Entity Framework CodeOnly

    - by Simon Fox
    This is a bit of a strange one but I've just seen something on twitter which kind of baffled me and I'm interested to know more. Rob Conery tweeted the following a couple of hours ago: Class name of the day: "Maybe<T>". Method of the day: "ToMaybe<T>()". He then went on to offer a Tekpub coupon to anyone who could guess where it came from. He linked to a further tweet which had a clue and from that I worked out that it was Entity Framework Code-Only but while trying to determine the usage someone else answered to which Rob replied ...EF CodeOnly - dealing with uncertainty.... So my question boils down to what exactly is he referring to with uncertainty and how does this fit in to Entity Framework Code-Only?

    Read the article

  • Hiding an internal interface in a "friend" assembly

    - by dmo
    I have two assemblies: A and B. A has InternalsVisibleTo set for B. I would like to make calls from A to get information that can only be known by a type defined in B in a way that keeps things internal. I can do this using an internal interface defined in A and implemented explicitly in B. Assembly A internal interface IHasData { Data GetData(); } class ClassA { DoSomething(IHasData); } Assembly B public abstract class ClassB : IHasData { Data IHasData.GetData() { /** do something internal **/ } } The trouble comes when someone references assembly B and derives from ClassB - they get the error: "The type 'AssemblyA.IHasData' is defined in an assembly that is not referenced" even though that type should be invisible to them. If I look at the public type definition I see what I expect - ClassB with no interfaces implemented. Why do I get this error? All of the implementation is in assembly B. I could use IHasData internally in ClassB and that wouldn't require assembly A to be referenced. Can someone help me understand what is going on?

    Read the article

  • Getting raw display data from NSView

    - by caballo7
    hi-- my goal is to send an NSView over the wire. i was wondering whether there was a way to get the raw display data contained in an NSView so that I can send this data over the wire and re-display this at the destination. thanks.

    Read the article

  • Need your feedback on our new SQL Server Connectivity portal

    - by The Official Microsoft IIS Site
    SQL Server, as a database product, has grown over the years and there are multiple ways to connect to it. Often, the different ways to connect to the database get documented and discussed in the various technology sections, and the technology choice determines which connectivity method one is going to use. For example, if one is writing a C++ application then one has to go with ODBC whereas a PHP web site developer will choose the PHP driver of course. Until now, this information was scattered all...(read more)

    Read the article

  • Coffeeshop limits Internet connection to 30 minutes -- how does it recognize me if I delete my cooki

    - by Andrew
    I was connected to the Internet in a coffeeshop earlier today, but I was only allowed 30 minutes of access. I tried deleting my cookies after my time was up (though admittedly I didn't delete my Flash cookies -- would that have solved the problem?), but the connection still recognized that I'd already used 30 minutes, so I couldn't connect again. How did the connection recognize me still? The wireless was unprotected (no code or password), it just had a portal you had to pass through upon the initial connection. I'm not terribly familiar with web development or computer networks, so just trying to get a better idea of what's happening (and possibly to know what to do next time I use up my minutes =)).

    Read the article

  • Inheritance issue with ivar on the iPhone

    - by Buffalo
    I am using the BLIP/MYNetwork library to establish a basic tcp socket connection between the iPhone and my computer. So far, the code builds and runs correctly in simulator but deploying to device yields the following error: error: property 'delegate' attempting to use ivar '_delegate' declared in super class of 'TCPConnection' @interface TCPConnection : TCPEndpoint { @private TCPListener *_server; IPAddress *_address; BOOL _isIncoming, _checkedPeerCert; TCPConnectionStatus _status; TCPReader *_reader; TCPWriter *_writer; NSError *_error; NSTimeInterval _openTimeout; } /** The delegate object that will be called when the connection opens, closes or receives messages. */ @property (assign) id<TCPConnectionDelegate> delegate; /** The delegate messages sent by TCPConnection. All methods are optional. */ @protocol TCPConnectionDelegate <NSObject> @optional /** Called after the connection successfully opens. */ - (void) connectionDidOpen: (TCPConnection*)connection; /** Called after the connection fails to open due to an error. */ - (void) connection: (TCPConnection*)connection failedToOpen: (NSError*)error; /** Called when the identity of the peer is known, if using an SSL connection and the SSL settings say to check the peer's certificate. This happens, if at all, after the -connectionDidOpen: call. */ - (BOOL) connection: (TCPConnection*)connection authorizeSSLPeer: (SecCertificateRef)peerCert; /** Called after the connection closes. You can check the connection's error property to see if it was normal or abnormal. */ - (void) connectionDidClose: (TCPConnection*)connection; @end @interface TCPEndpoint : NSObject { NSMutableDictionary *_sslProperties; id _delegate; } - (void) tellDelegate: (SEL)selector withObject: (id)param; @end Does anyone know how I would fix this? Would I simply declare _delegate as a public property of the base class "TCPEndPoint"? Thanks for the help ya'll!

    Read the article

  • Embeddable unit testing framework for mixed Windows app

    - by Andy Dent
    I want to test portions of a very complex app which includes both a major native Windows component and a substantial WPF GUI. Due to complexities I can't detail, it is impossible to run the native portion independently nor can I isolate the areas I want to test (spare me the lectures, we're talking a huge legacy code base and we do have refactoring plans). I'm looking for a unit test kit I can invoke on the native side but must be able to run with the app launched with the managed portion initialised. That seems to rule out the run executable feature of the cfix Windows unit test kit. I really like their philosophy, like WinUnit, of using DLL compilation as a way to add the reflective capabilities missing in C++ and gain a more NUnit-like experience. Ideally, I want something like WinUnit running within the application code and generating an HTML report. I'm trying to introduce more TDD and having things as lean as possible is important.

    Read the article

  • How can I "best fit" an arbitrary cairo (pycairo) path?

    - by Daniel Straight
    It seems like given the information in stroke_extents() and the translate(x, y) and scale(x, y) functions, I should be able to take any arbitrary cairo (I'm using pycairo) path and "best fit" it. In other words, center it and expand it to fill the available space. Before drawing the path, I have scaled the canvas such that the origin is the lower left corner, up is y+, right is x+, and the height and width are both 1. Given these conditions, this code seems to correctly scale the path: # cr is the canvas extents = cr.stroke_extents() x_size = abs(extents[0]) + abs(extents[2]) y_size = abs(extents[1]) + abs(extents[3]) cr.scale(1.0 / x_size, 1.0 / y_size) I cannot for the life of me figure out the translating though. Is there a simpler approach? How can I "best fit" a cairo path on its canvas? Please ask for clarification if anything is unclear in this question.

    Read the article

  • Is there a standard format string in ASP.NET to convert 1/2/3/... to 1st/2nd/3rd...?

    - by Dr. Monkey
    I have an integer in an Access database, which is being displayed in ASP.NET. The integer represents the position achieved by a competitor in a sporting event (1st, 2nd, 3rd, etc.), and I'd like to display it with a standard suffix like 'st', 'nd', 'rd' as appropriate, rather than just a naked number. An important limitation is that this is for an assignment which specifies that no VB or C# code be written (in fact it instructs code behind files to be deleted entirely). Ideally I'd like to use a standard format string if available, otherwise perhaps a custom string (I haven't worked with format strings much, and this isn't high enough priority to dedicate significant time to*, but I am very curious about whether there's a standard string for this). (* The assignment is due tonight, and I've learned the hard way that I can't afford to spend time on things that don't get the marks, even if they irk me significantly.)

    Read the article

  • Why are there so many man-made edge cases in IT, and is there any hope for simplification / unificat

    - by Hamish Grubijan
    This question is meant to generate discussion and so it is marked as community wiki. My observation is that the field of information technology grows so rapidly and randomly, that for many it takes a lot of time to learn many intricacies of some tools that will be obsolete in just short 3 years. If you look at the questions asked on StackOverflow ... at least half of them stem from the fact that some language / tool / API / protocol was poorly designed, is backwards and has gotchas. There are so many things which distract developers from converting English into machine code; instead they spend their time configuring stuff and gluing together things that do not really fit. How many times do you pick up somebody else's project (or someone picks up yours :) ) and realize that this program does not need half of the dialogs that it has, and that the logic can be simplified a great deal? But, it had to be made and sold here before a better thing is made and sold elsewhere, and hence all this rush. I often wish that things would just slow down. I do not want Microsoft Windows to run on my car's computer, my watch, my table, my toaster oven, and my toilet seat. I'd rather have Windows that DOES NOT HAVE WINDOWS REGISTRY, I'd rather have Windows that allows two different programs to work on the same file at the same time, the way it works on Unix systems. Microsoft is just an example. I am looking forward to the day when I do not have to worry about Windows vs Unix new line break, when System32 actually means that this directory contains 32-bit binaries, and not 64-bit ones, the day when dll hell and manifest hell are no longer an issue, the day when it takes me a lot less than 3 months on a new job to learn the system. I do not mean learning the entire code base of a product (depending on the size of it, it can take a long time). I mean - remembering which build-assisting scripts are written in Perl and which version of it, and which ones are done through .bat files, when do I need to manually make every file in some directory writable before running a script, or else a critical step of a database maintenance home-grown tool will bomb, and it will take 2 days to clean that up. Makes me wonder if humans enslaved computers, or if it is the other way around. The key is that improving those things will not bring extra revenue, and hence those taking the time to fix crap like that are not "business focused". However, these imperfections irritate me immensely, particularly because my memory is limited - I can hold only a small portion of that useless knowledge of a system in my head at any given point in time. I must not be alone. Did you also happen to notice that a programmer can waste a lot of time on things that should have been a lot more straight-forward? Is there hope? Will things get better/simpler in the future, or will there be a lot more IT crap floating around? I suppose I see diversity of tools, protocols, etc. as a bad thing. Thank you for participation.

    Read the article

  • Pure-JavaScript projects in NetBeans?

    - by Matt Zukowski
    This seems like it ought to be obvious, yet I can't figure it out. I do a lot of JavaScript coding, and I really like NetBeans. Unfortunately I can't figure out how to create a "JavaScript" project in NetBeans. If I go to File - New Project, my only options are "Java", "Ruby", and "NetBeans Modules". I don't want any of these. My project consists mostly of JavaScript, with a little bit of CSS. I ususally just end up creating a "Ruby" project, but this seems retarded, since I don't actually have any Ruby code. Why isn't there an option to create a "JavaScript" or "Web" project, or at least a "Generic" project that doesn't revolve around a specific language? Am I missing something here?

    Read the article

  • FormMethod.Get and query string parameters

    - by parminder
    Hi Experts, I am working on a website in asp.net mvc. I have to show a view where user put some search values like tags and titles to search. I want to use the same Index method for that. I have make my form to use formMethod.Get to send the parameters as querystring. so here is the method [HttpGet] public ActionResult Index(string title, string tags, int? page) { if (string.IsNullOrEmpty(title) return View(null); var list = GetSomeData(); return View(list); } here is my view <div id="searchBox"> <% using (Html.BeginForm(null, null, FormMethod.Get)) { %> <table> <tr> <td> <input type="hidden" id="isPosted" name="isPosted" value="1" /> I am looking for <%=Html.TextBox("Title")%> Tags: <%=Html.TextBox("Tags")%> <input id="search" type="submit" value="Search" /> </td> </tr> </table> <% } %> So when the user first visit the page, he will see only two text boxs and a button. but when he types something in the title and tags and click the search button i will load the view with some data. Now the problem is when i type something in title and tags box and click search, they are received in the method, but are not visible in the url. Is there anything i m doing wrong. help will be appreciated. Regards Parminder

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >