Search Results

Search found 1816 results on 73 pages for 'attach'.

Page 46/73 | < Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >

  • How can I know whether my C++ string variable is a number or not

    - by user342580
    I have a string of class string string str; how can I check if it is a number or not, str can only have 3 possible types described below like abcd or a number like 123.4 or a number with a parenthesis attach to the end it for example 456) note the parenthesis at the end of "str" is the only possible combination of number and none number where the bottom two are considered valid numbers, I know I could use lexical_cast if only the first 2 cases occur, but how about considering all 3 possible cases to occur? I don't need to do anything fancy with str, I just need to know whether it is a valid number as I described

    Read the article

  • NetBeans create and instantiate programatically custom swing widgets

    - by RenegadeAndy
    Hey! I have a problem I know how I would solve easily developing under eclipse - but not so easily developing under net beans. I want to create a custom swing widget - which I can instantiate by code as many as I need and attach them to my main panel. I have developed the rest of the GUI using the GUIBuilder. The problem is - im not entirely sure how to do this. Say I got 20 results back from a web service, I would wana loop round - and add 20 of these custom swing widgets - the custom swing widgets would look as follows : :Picture: :Label: :Label: Can anybody please help me, im not entirely sure how to do the custom widget either! Thanks in advance for any support. Andy

    Read the article

  • What is the best way to read files in an EventMachine-based app?

    - by Theo
    In order not to block the reactor I would like to read files asynchronously, but I've found no obvious way of doing it using EventMachine. I've tried a few different approaches, but none of them feels right: Just read the file, it'll block the reactor, but what the hell, it's not that slow (unless it's a big file, and then it definitely is). Open the file for reading and read a chunk on each tick (but how much to read? too much and it'll block the reactor, too little and reading will get slower than necessary). EM.popen('cat some/file', FileReader) feels really weird, but works better than the alternatives above. In combination with the LineAndTextProtocol it reads lines pretty swiftly. EM.attach, but I haven't found any examples of how to use it, and the only thing I've found on the mailing list is that it's deprecated in favour of… EM.watch, which I've found no examples of how to use for reading files. How do you read files within a EventMachine reactor loop?

    Read the article

  • C++ setTimout function ?

    - by Quandary
    What's the cheapest way for a JavaScript like setTimeout-function in C++? I would need this: 5000 miliseconds from now, start function xy (no parameters, no return value). The reason for this is I need to initialize COM for text to speech, but when I do it on dll attach, it crashes. It works fine however if I do not call CoInitialize from dllmain. I just need to call CoInitialize and CoCreateInstance, and then use the instance in other functions. I can catch the uninitialized instance by checking for NULL, but I need to initialize COM - without crashing.

    Read the article

  • the breakpoint will not currently be hit no symbols loaded

    - by Carlos_Liu
    I want to debug on the customer's machine (Windows Server 2003) to track a problem, and out product is based on .NET 2.0. I want to use DbgCLR.exe to debug a file AAA.dll, what I did is: install .NET 2.0 SDK on the customer's machine (to get the DbgCLR.exe) copy the symbol file AAA.pdb to the same directory with AAA.dll get the source file for AAA.dll the AAA.dll will be loaded by w3wp.exe, so in the DbgCLR Tools-Attach to Process, then I choose w3wp.exe File-Open-File open the source file and add a breakpoint in the function which will be callled but the breakpoint seems do no work because there is an warning icon on it and says : the breakpoint will not currently be hit. No symbols have been loaded for this document. On my computer (Windows XP) which has the debug version of whole source code, I did nearly the same thing as above but the different is: I attached aspnet_wp.exe to do the debug and it works What should I do to let it work on the customer's machine?

    Read the article

  • How to create HTML email with embeded image and show it in the default mail client using .net (c#)?

    - by NVM
    If you look at the Snip tool in windows there is an option to send the snip as an embedded attachment in the default mail client (I guess as an html email). I need exactly that. At the moment I am using simple MAPI to attach the image but that does not allow embedding. One key requirement is that it should be created and then shown in the default mail client. I don't think I can use System.Net.Mail for that. Or can I? Its a WPF application using c#.

    Read the article

  • EF 4.1 Code First Detaching Entity

    - by Nazaf
    I am trying to add an entity to the DB. Once I have added it, I want to detach it, so I can manipulate the object safely without making any changes to the DB. After calling context.SaveChanges() I do the following to detach the entity: // save context.Stories.Add(story); // attach tags. They already exists in the database foreach(var tag in story.Tags) context.Entry(tag).State = System.Data.EntityState.Unchanged; context.SaveChanges(); context.Entry(story).State = System.Data.EntityState.Detached; However, changing the entity state to DETACHED will remove all related entities associated with the my entity. Is there a way to stop this ? If I don't detach the entity, all my changes are sent to the DB next time I call context.SaveChanges() Thanks!!

    Read the article

  • ActionScript 3 Context Menu Per Sprite?

    - by TheDarkIn1978
    is it not possible to have different context menus for different sprites on the stage? i've tried adding a custom context menu to a sprite but it's applied to the entire stage: mySprite.contextMenu = myMenu; then after reading the documentation where it states: You can attach a ContextMenu object to a specific button, movie clip, or text field object, or to an entire movie level. You use the menu property of the Button, MovieClip, or TextField class to do this. ok, so i though i had to write it like: mySprite.menu.contextMenu = myMenu; only to be greeted with a nice migration issue stating that menu is legacy code and to use contextMenu instead. ??? um, thanks for the headsup, documentation. this process would be entirely much more easier if i could extend the ContextMenu, but for some reason it's marked as "final" and can't be extended... i'm sure adobe's reasons for finalizing the context menu class are as good as their reasons for including misleading documentation. thoughts?

    Read the article

  • How to use Visual Studio and IIS7 together?

    - by Pure.Krome
    Hi folks, i'm trying to use Visual Studio 2010 (but this also happens with VS2008) as my web server for all locahost development. When i go into the properties for my web application (sigh, it's a legacy web FORMS app) and check the Web tab .. then check the Use Local IIS Web Server option ... it only allows me to create a virtual directory against a website. Why?! this is not what I want :( I wanted to have my own IIS7 website (no virtual directory) and debug against that. Can anyone help me? As a side note, i tried to use the third option Use Custom Web Server .. which ends up pointing to my localhost iis7 server. Now, this works ... but when i wish to Start Debugging .. it errors :( (it's not sure how to attach to that process or something?) So - can anyone out there please help?

    Read the article

  • Get array of elements from event

    - by Anton
    I have few nested DIV elements. For example: <div id='id1'><div id='id2'>content</div></div> I attach event to DIVs event handler using jQuery: $('div').click(function () { //some code }); There will be two events when user click on content. So there will be two simultaneous events. Is it possible to get inside event handler array of objects (DIVs) what have click event? May be it is possible using other framework but jQuery?

    Read the article

  • Sync between local service with a thread and an activity

    - by Henrik
    Hello all, I'm trying to think of a way on how to sync in between a local service and the main activity. The local service has, A thread with a socket connection that could receive data at any time. A list/array with data. At any time the socket could receive data and add it to the list. The activity needs to display this data. So when the activity starts up it needs to attach or start the local service and fetch the list. It also needs to be notified if the list is updated. I think I would need to sync my list somehow so the local service does not add a new entry to it while the activity fetches the list when connecting to the service. Any ideas? Thanks.

    Read the article

  • How to create relationship mapping via Entity framework

    - by James
    I have following domain model: User { int Id; } City { int Id; } UserCity { int UserId, int CityId, dateTime StartDate } In the function where I have to attach a user to a city, the following code is working for me: UserCity uc = new UserCity(); //This is a db hit uc.User = MyEntityFrameworkDBContext.User.FirstOrDefault(u => u.ID == currentUserId); //this is a db hit uc.City = MyEntityFrameworkDBContext.City.FirstOrDefault(c => c.ID == currentCityId); uc.StartDate = userCityStartDate; //this is a db hit MyEntityFrameworkDBContext.SaveChanges(); Is there any way I can create relationships with just one single DB hit? The first two db hits are not required, actually.

    Read the article

  • One table for uploads for multiple resources in CakePHP

    - by Mef
    Hi, I have CakePHP app in which I'd like to attach gallery to multiple resources. Let's say I've got artists, each one has own gallery. I've got articles, every article has some images attached to it and so on. Now I set up tables like this: Artists hasMany Artistimages, fields in artistimages table are: id, artist_id, filename, filetype, filesize etc. Articles hasMany Articleimages, fields in articleimages table are: id, article_id, filename, filetype, filesize etc. ...but this is not how it should be, I think. Is there possibility to have one table called for example uploads which will contain all images with foreign key pointing to resource its reffering to? How to tell CakePHP which image is coming from which resource?

    Read the article

  • Attaching a function to the parent window from an iframe and getting proper scope

    - by Ronald
    I working on adding file uploading to my web application. I'm using an iframe to post my upload. When my php script processes the upload it writes some JavaScript to the iframe. This JavaScript is attempting to attach a function to the parent, this works, but when this function actually gets called it doesn't have the correct scope. Here is the code I'm attaching to the parent window: parent.window.showPreview = function(coords) { if (parseInt(coords.w) > 0) { var rx = 200 / coords.w; var ry = 250 / coords.h; $('#preview').css({ width: Math.round(rx * 400) + 'px', height: Math.round(ry * 533) + 'px', marginLeft: '-' + Math.round(rx * coords.x) + 'px', marginTop: '-' + Math.round(ry * coords.y) + 'px' }); } } When this function gets executed I get an error that says $ is not defined. I've tried adding changing the JQuery call to parent.$('#preview').css..., but then it says that parent is undefined. Any ideas?

    Read the article

  • Safari on the iPhone & iPad gives colour feedback on touch, I want to stop this.

    - by Owen
    Clicking on an element which has a Javascript handler makes the element go have a 'grey overlay'. This is normally fine but I'm using event delegation to handle the touchdown events of many child elements. Because of the delegation the 'grey overlay' is appearing over the parent element and looks bad and confusing. I could attach event handlers to the individual elements to avoid the problem but this would be computationally very wasteful. I'd rather have some webkit css property that I can override to turn it off. I already have visual feedback in my app so the 'grey overlay' is not needed. Any ideas?

    Read the article

  • How can I send email from my application ?

    - by srikanth rongali
    I want to attach a video and send email from my application. I downloaded apples example code MailComposer. I compiled it. I did not get any errors or warnings. I sent the mail to my mail id. But, I could not see any mail in my inbox. I am working on simulator. I did not set any senders email id in simulator. How can I know whether the code is working or not ? Thank You.

    Read the article

  • Should I send patch against 2-3-stable or master

    - by Nadal
    I am trying to find a way to contribute back to rails. I was thinking I should validate if this patch https://rails.lighthouseapp.com/projects/8994/tickets/4154-expires_now-broken works or not. I was able to validate the problem. The problem still exists in 2.3.5 and in 2-3-stable branch of rails. I was not able to apply his patch at 2-3-stable branch of rails . Also the patch failed for master branch. Looked at the diff and manually changed the code and the new code solves the bug. Now if I want to attach my patch to the ticket should I create my patch against 2-3-stable branch or master branch? I believe master is more closely aligned with rails3 changes.

    Read the article

  • Why do my Xcode default font starts to look ugly after some time, until I restart?

    - by mystify
    I plugged in an external monitor. All resolutions match perfectly. MacBookPro LCD is closed. After about 10 minutes my fonts in Xcode start to look very bad. Only in Xcode. When I restart the mac and don't use an external monitor, fonts look all right again. When I attach the monitor again, fonts look nice. Then I close XCode and reopen it: Fonts suck. All other fonts look great. It seems like Xcode isn't antialiasing them properly after something happens. For my observation it happens when I quit and reopen Xcode while an external monitor is in use. Only way to fix it then is to completely reboot. Is there a fix for this problem?

    Read the article

  • How to replace&add the dataframe element by another dataframe in Python Pandas?

    - by bigbug
    Suppose I have two data frame 'df_a' & 'df_b' , both have the same index structure and columns, but some of the inside data elements are different: >>> df_a sales cogs STK_ID QT 000876 1 100 100 2 100 100 3 100 100 4 100 100 5 100 100 6 100 100 7 100 100 >>> df_b sales cogs STK_ID QT 000876 5 50 50 6 50 50 7 50 50 8 50 50 9 50 50 10 50 50 And now I want to replace the element of df_a by element of df_b which have the same (index, column) coordinate, and attach df_b's elements whose (index, column) coordinate beyond the scope of df_a . Just like add a patch 'df_b' to 'df_a' : >>> df_c = patch(df_a,df_b) sales cogs STK_ID QT 000876 1 100 100 2 100 100 3 100 100 4 100 100 5 50 50 6 50 50 7 50 50 8 50 50 9 50 50 10 50 50 How to write the 'patch(df_a,df_b)' function ?

    Read the article

  • How do you handle multiple (overlapping) projects in trac?

    - by Oliver Giesen
    We are using trac and are really satisfied with it. However, out of the box, trac is best suited for single-project environments only. I'd be interested to hear about the various approaches people take to make it work with multiple projects nevertheless and their experiences with them. Are there any plugins to recommend? Any patches, tweaks or whatnots? Are you maybe even using an entirely different bug-tracking system that offers all of trac's functionality plus multi-project support? We recently started managing a second project ourselves which generally works okay but also has some drawbacks, especially where the two projects overlap because of common library code we wrote that is used in both projects. How do you handle this? (I'll attach our own current approach as an answer to this post.)

    Read the article

  • Alternative to jQuery .data()?

    - by thebossman
    I'm a big fan of jQuery's .data() method, but I can't always use it. Often times I am rendering html templates that I pass via AJAX and I need to attach metadata to each of the elements in the template. For example: <ul> {% for item in itemlist %} <li metadata="{{ item.metadata }}">{{ item.name }}</li> {% endfor %} </ul> I know attaching attributes to store data is bad practice (and it might not even work in older versions of IE). What is the best practice? Is there a good alternative to this method?

    Read the article

  • YAHOO.util.Connect.asyncRequest does not work in Safari

    - by 24x7Programmer
    When I request a webpage using YAHOO.util.Connect.asyncRequest in Safari I always get Communication Failure message in callback's failure properties statusText. The same method works in IE. What could be wrong here? Here is the code. When the code is executed I always get two alerts: "Three" and "communications failure undefined" (corresponding to the second alert in the failure part below.) Also when I attach the debugger and put break point in the SAProvision.aspx's page load event, the break point is not hit. So it is sure that in safari the page is not being called. While the same is called when executed from IE. function ProvisionBlade() { var path = "http://localhost/SC/Dashboard/SAProvision.aspx" YAHOO.util.Connect.asyncRequest("POST", path, callbacks1, null); } var callbacks1 = { success: function(o) { var check = "test"; alert(o.responseText); }, failure: function(o) { alert("Three"); alert(o.statusText + ' ' + o.responseText); } }

    Read the article

  • Tabbed application troubles in xcode

    - by trludt
    I am working with my first tabbed application in xcode. I am just testing with some stuff since I'm relatively new to programming. I am just using the 2 views already put into the template. I am putting a slider into the first view and am going to attach it to a text box with numbers. But that isn't the problem! This is probably really stupid and simple, but when i run the application just to see the stuff on the simulator, it is just showing a black screen. NO CLUE WHY! But its killing me and would love some help!

    Read the article

  • jQuery jqXHR - cancel chained calls, trigger error chain

    - by m0sa
    I am creating a ajax utility for interfacing with my server methods. I would like to leverage jQuery 1.5+ deferred methods from the object returned from the jQuery.ajax() call. The situation is following. The serverside method always returns a JSON object: { success: true|false, data: ... } The client-side utility initiates the ajax call like this var jqxhr = $.ajax({ ... }); And the problem area: jqxhr.success(function(data, textStatus, xhr) { if(!data || !data.success) { ???? // abort processing, trigger error } }); return jqxhr; // return to caller so he can attach his own handlers So the question is how to cancel invocation of all the callers appended success callbacks an trigger his error handler in the place mentioned with ???? ? The documentation says the deferred function invocation lists are FIFO, so my success handler is definitely the first one.

    Read the article

  • Cant append "used" DOMObject in IE

    - by Kein
    I have some objects, that keep created DOMObjects, like here: function category(){ var domBlock; this.block = function(){ if (!domBlock){ // Here dom-object constructor $('<div></div>'); etc } return domBlock; // jquery object, // but i test and native document.createElement } } Then i clear category's area, and append old and new received(with Ajax) objects: area.html(''); for(id in category_list){ area.append( category_list[id].block() ); } where category_list is list that contain category objects. Area is jQuery object. In other browsers (except IE) i get area with all needed categories, but in IE i get only new received categories(that just create DomObject), other old objects that keeped old DomObject not show. I know it possible make with innerHTML, but i wont keep DomObject, not text. Because DomObject keep many events. And it very hard for browser attach events for each DomObject after refresh area.

    Read the article

< Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >