Search Results

Search found 1485 results on 60 pages for 'dan heyse'.

Page 32/60 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • Binding a list belonging to another object in a custom model binder in ASP.NET MVC

    - by Dan
    I realize something like this has been asked, but this may be a little different Below is my Event object: Event : IEvent public int Id public string Title public List<EventContact> Contacts And EventContact: EventContact public int Id public string Name So, an Event has a list of EventContact' objects. Now, Event also implements IEvent - hence the custom model binder. I useIEventinstead of Event, so when the default model binder tries to do its thing, it lets me know it can't create anIEvent'. I have my view with populated with the contact info: <input type="text" name="contact[0].Name" value="DB Value"/> <input type="text" name="contact[1].Name" value="DB Value"/> <input type="text" name="contact[2].Name" value="DB Value"/> <!-- Event fields, etc --> So, in my custom model binder I am able to see all the value - sweet! The only thing is, I'm really not sure how to get all the contact fields and create a list of contacts from them, along with binding all the Event fields. Any and all help is appreciated!

    Read the article

  • Using the erlang mysql module, how is a database connection closed?

    - by Dan
    In using the erlang mysql module the exposed external functions are: %% External exports -export([start_link/5, start_link/6, start_link/7, start_link/8, start/5, start/6, start/7, start/8, connect/7, connect/8, connect/9, fetch/1, fetch/2, fetch/3, prepare/2, execute/1, execute/2, execute/3, execute/4, unprepare/1, get_prepared/1, get_prepared/2, transaction/2, transaction/3, get_result_field_info/1, get_result_rows/1, get_result_affected_rows/1, get_result_reason/1, encode/1, encode/2, asciz_binary/2 ]). From the this this, it is not apparent how to close a connection. How a connection closed?

    Read the article

  • In Coldfusion, how do I init a component that is located above the current path folder?

    - by Dan Sorensen
    If I have a folder structure that looks like this: / /bin/myComponent.cfc /reports/index.cfm How do I initiate myComponent.cfc from index.cfm? myService = createObject("component", "bin.myComponent"); Using the dot syntax, I know how to go to deeper folders, but how to do I go up a folder, and down into the other folder? Using slash syntax it would be something like this: ../bin/myComponent.cfc But createObject() doesn't work that way. I'd like to keep a relative path so that I can move this folder to another server without breaking the paths. Ideas? Thanks!

    Read the article

  • Why won't my styles show in a Dynamics CRM 4 IFRAME?

    - by Dan Crowther
    I have created a web page (ASP.NET) that includes a stylesheet to mimic Dynamics CRM styles. This is to be used in a CRM IFRAME (within a form). The stylesheet is referenced as follows: <head id="Head1" runat="server"> <link href="Styles.css" rel="stylesheet" type="text/css" /> </head> When I load the page in Visual Studio, all is well. When I load it in CRM, none of the styles are shown and no images are displayed. If I browse directly to the image, I get a 404 error. However, the pages function correctly. I have set read permissions for "Everyone" on the server to see if that was causing a problem but it didn't help. I also tried putting a plain HTML page in the folder and that won't load either - again a 404. The page is installed in the ISV folder ..../isv/MyProject. Can anyone help? EDIT This is on a multi-tenancy system. On my test company (testcompany) if I browse to http://crm/testcompany/isv/MyProject/MyPage.aspx, the page is loaded (without styles and images). If I browse to http://crm/testcompany/isv/MyProject/TestImage.gif, the image is not shown. If I browse to http://crm/isv/MyProject/TestImage.gif, the image is shown. Does this suggest a problem with the server setup and the way CRM messes around with virtual directories?

    Read the article

  • Using TextOptions.TextFormattingMode with FormattedText

    - by dan gibson
    With WPF4 you can have non-blurry text by adding TextOptions.TextFormattingMode="Display" and TextOptions.TextRenderingMode="Aliased" to your xaml: <Window TextOptions.TextFormattingMode="Display" TextOptions.TextRenderingMode="Aliased"> This works fine for me except for when I draw text with DrawingContext.DrawText like this: void DrawText(DrawingContext dc) { FormattedText ft = new FormattedText("Hello World", System.Globalization.CultureInfo.CurrentCulture, System.Windows.FlowDirection.LeftToRight, new Typeface(FontFamily, FontStyle, FontWeight, FontStretch), FontSize, brush); dc.DrawText(ft, new Point(rect.Left, rect.Top)); } How can I draw non-blurry text with FormattedText? ie I want TextOptions.TextFormattingMode="Display" and TextOptions.TextRenderingMode="Aliased" to be used.

    Read the article

  • Is Fast Enumeration messing with my text output?

    - by Dan Ray
    Here I am iterating through an array of NSDictionary objects (inside the parsed JSON response of the EXCELLENT MapQuest directions API). I want to build up an HTML string to put into a UIWebView. My code says: for (NSDictionary *leg in legs ) { NSString *thisLeg = [NSString stringWithFormat:@"<br>%@ - %@", [leg valueForKey:@"narrative"], [leg valueForKey:@"distance"]]; NSLog(@"This leg's string is %@", thisLeg); [directionsOutput appendString:thisLeg]; } The content of directionsOutput (which is an NSMutableString) contains ALL the values for [leg valueForKey:@"narrative"], wrapped up in parens, followed by a hyphen, followed by all the parenthesized values for [leg valueForKey:@"distance"]. So I put in that NSLog call... and I get the same thing there! It appears that the for() is somehow batching up our output values as we iterate, and putting out the output only once. How do I make it not do this but instead do what I actually want, which is an iterative output as I iterate? Here's what NSLog gets. Yes, I know I need to figure out NSNumberFormatter. ;-) This leg's string is ( "Start out going NORTH on INFINITE LOOP.", "Turn LEFT to stay on INFINITE LOOP.", "Turn RIGHT onto N DE ANZA BLVD.", "Merge onto I-280 S toward SAN JOSE.", "Merge onto CA-87 S via EXIT 3A.", "Take the exit on the LEFT.", "Merge onto CA-85 S via EXIT 1A on the LEFT toward GILROY.", "Merge onto US-101 S via EXIT 1A on the LEFT toward LOS ANGELES.", "Take the CA-152 E/10TH ST exit, EXIT 356.", "Turn LEFT onto CA-152/E 10TH ST/PACHECO PASS HWY. Continue to follow CA-152/PACHECO PASS HWY.", "Turn SLIGHT RIGHT.", "Turn SLIGHT RIGHT onto PACHECO PASS HWY/CA-152 E. Continue to follow CA-152 E.", "Merge onto I-5 S toward LOS ANGELES.", "Take the CA-46 exit, EXIT 278, toward LOST HILLS/WASCO.", "Turn LEFT onto CA-46/PASO ROBLES HWY. Continue to follow CA-46.", "Merge onto CA-99 S toward BAKERSFIELD.", "Merge onto CA-58 E via EXIT 24 toward TEHACHAPI/MOJAVE.", "Merge onto I-15 N via the exit on the LEFT toward I-40/LAS VEGAS.", "Keep RIGHT to take I-40 E via EXIT 140A toward NEEDLES (Passing through ARIZONA, NEW MEXICO, TEXAS, OKLAHOMA, and ARKANSAS, then crossing into TENNESSEE).", "Merge onto I-40 E via EXIT 12C on the LEFT toward NASHVILLE (Crossing into NORTH CAROLINA).", "Merge onto I-40 BR E/US-421 S via EXIT 188 on the LEFT toward WINSTON-SALEM.", "Take the CLOVERDALE AVE exit, EXIT 4.", "Turn LEFT onto CLOVERDALE AVE SW.", "Turn SLIGHT LEFT onto N HAWTHORNE RD.", "Turn RIGHT onto W NORTHWEST BLVD.", "1047 W NORTHWEST BLVD is on the LEFT." ) - ( 0.0020000000949949026, 0.07800000160932541, 0.14000000059604645, 7.827000141143799, 5.0329999923706055, 0.15299999713897705, 5.050000190734863, 20.871000289916992, 0.3050000071525574, 2.802999973297119, 0.10199999809265137, 37.78000259399414, 124.50700378417969, 0.3970000147819519, 25.264001846313477, 20.475000381469727, 125.8580093383789, 4.538000106811523, 1693.0350341796875, 628.8970336914062, 3.7990000247955322, 0.19099999964237213, 0.4099999964237213, 0.257999986410141, 0.5170000195503235, 0 )

    Read the article

  • Considerations when architecting an application using Dependency Injection

    - by Dan Bryant
    I've begun experimenting with dependency injection (in particular, MEF) for one of my projects, which has a number of different extensibility points. I'm starting to get a feel for what I can do with MEF, but I'd like to hear from others who have more experience with the technology. A few specific cases: My main use case at the moment is exposing various singleton-like services that my extensions make use of. My Framework assembly exposes service interfaces and my Engine assembly contains concrete implementations. This works well, but I may not want to allow all of my extensions to have access to all of my services. Is there a good way within MEF to limit which particular imports I allow a newly instantiated extension to resolve? This particular application has extension objects that I repeatedly instantiate. I can import multiple types of Controllers and Machines, which are instantiated in different combinations for a Project. I couldn't find a good way to do this with MEF, so I'm doing my own type discovery and instantiation. Is there a good way to do this within MEF or other DI frameworks? I welcome input on any other things to watch out for or surprising capabilities you've discovered that have changed the way you architect.

    Read the article

  • Change Layout Of Text Created In Java [Android]

    - by Dan
    Ok right , i asked how to create a random number from 1-100 for android and i came to this TextView tv = new TextView(this); int random = (int)Math.ceil(Math.random()*101); tv.setText("Your Number Is..."+ random ); What this does is create the default kinda "hello world" style text view and says "Your Number Is.... [Then Random Number] My problem is that i cant change the layout of this text , because it is not defined in XML, if someone could tell me how to change the style , or like make the random number into a string so i could use it for any Textview layout that would be great .. Thanks :)

    Read the article

  • Facebook og:url ignored in favour of a Facebook hosted page about the og entity

    - by Dan
    I am trying to implement the Like button on my pages. Those pages represent the review page for a product. When a user Likes the page, it shows up in Facebook (not as a link, but as liking an entity), however when you click on the entity in Facebook it links through to a facebook.com hosted page representing the page. I want the user to be redirected to the og:url page? This happens for example when you Like an artist page on Grroveshar: http://grooveshark.com/#!/artist/Elbow/4795 I am clearly "doing it wrong". I am using the following markup to include the SDK. MYAPPID is included by the code generator Facebook provides so I assume it is required. <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=MYAPPID"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> Then my code to render the Like button. <div class="fb-like" data-send="false" data-width="450" data-show-faces="true"></div> And finally my og tags: <meta property="og:title" content="My product" /> <meta property="og:type" content="product" /> <meta property="og:url" content="http://site.com/product_1/" /> <meta property="og:image" content="http://site.com/image1.jpg" /> <meta property="og:site_name" content="My-Site-Name.com" /> <meta property="fb:admins" content="MYFACEBOOKID" /> <meta property="fb:app_id" content="MYAPPID" /> Thanks!

    Read the article

  • javax script how to call a function in JavaScript from Java

    - by Dan Howard
    Hi All, I'm trying to call a function in JavaScript via Java. This works fine when directly reading a script as a string but I'm using CompiledScripts. When I do this with a compiled script it gives me method not found if I also add bindings. Without bindings it works but of course the function fails because it needs the bindings. Any ideas? CompiledScript script = ... get script.... Bindings bindings = script.getEngine().createBindings(); Logger scriptLogger = LogManager.getLogger("TEST_SCRIPT"); bindings.put("log", scriptLogger); //script.eval(bindings); -- this way fails script.eval(); // -- this way works Invocable invocable = (Invocable) script.getEngine(); invocable.invokeFunction(methodName); TIA

    Read the article

  • PHP anonymous functions scope question

    - by Dan
    Hi, I'm trying to sort an array of objects by a common property, however I cannot get my $property parameter to register in the inner function (I can use it in the outer one OK). The way I read the documentation, it sounded like the parameter would be available, have I misunderstood something? Here is what I have: public static function sortObjectsByProperty($objects, $property) { function compare_object($a, $b) { $a = $a->$property; $b = $b->$property; if ($a->$property == $b->$property) { return 0; } return ($a->$property > $b->$property) ? +1 : -1; } usort($objects, 'compare_object'); return $objects; } Any advice appreciated. Thanks.

    Read the article

  • How to customize the appearance of a tab bar?

    - by Dan Harrelson
    I am looking to customize the appearance of a tab bar. Specifically I want to: Change the default tabBar color Add a custom image on top of the tabBar Add custom images to tabBarButtons Change the font of tabBarButtons In a nutshell, I want all of the functionality of a tab bar but with a completely custom look. Should I start subclassing elements, or using categories or what?

    Read the article

  • Best way to implement keywords for image upload gallery

    - by Dan Berlyoung
    I'm starting to spec out an image gallery type system similar to Facebook's. Members of the site will be able to create image galleries and upload images for others to view. Images will have keywords the the uploader can specify. Here's the question, what's the best way to model this? With image and keyword tables linked vi a HABTM relation? Or a single image table with the keywords saved as comma delimited values in a text field in the image record? Then search them using a LIKE or FULL TEXT index function? I want to be able to pull up all images containing a given keyword as well as generate a keyword cloud. I'm leaning toward the HABTM setup but I wanted to see what everyone else though. Thanks!!

    Read the article

  • using SET datatype in mysql

    - by Dan Snyder
    Is it possible to set a varaible to a query result such as: DECLARE result INT; SET result = (SELECT index FROM table WHERE data = 'xxxx' LIMIT 1); Assuming of course you know that there will only be one result set

    Read the article

  • Accessing previous activity instances in a sequence activity

    - by Dan Revell
    This has a rather SharePoint spin to it but the problem is straight workflow. I've got a parallel replication activity which contains a sequence activity. The sequence activity contains a CreateTask activity, a CodeActivity, a OnTaskChanged activity and finally a CompleteTask activity. The idea is to create a task for each username passed into the ReplicatorActivity.InitialChildData property. Typically in workflow I bind a field to the CreateTask.TaskId and CreateTask.TaskProperties and inside the CreateTask.MethodInvoking I set these through the local bound fields. This works and my tasks all get created properly. However in the CodeActivity that follows, I want to then access the TaskProperties. The problem I am encountering is that this field holds the values of the final task to be created as the CreateTask runs for all the replications before the CodeActivity gets to runs. From the CodeActivity, here are two ways I've tried to access the CreateTask activity instance from the same context or instance or whatever the terminology is for the replicated sequence. CreateTask task = ((CreateTask)sender.Parent.GetActivityByName("createSoftwareRequestTask", true)); CreateTask createTask = (CreateTask)sender.Parent.Activities[0]; Unfortunately the CreateTask activities both refer back to the last task to be created and not the task from the context that the CodeActivity is executing within. Two reasons why this might be that I can think of. I'm not accessing the correct instance with my code. I am accessing the correct instance, but as the properties I require were bound to and set through local fields then their previous data was overwritten. I'm hitting a brick wall with my understanding of workflow with this and would very much appreciate some assistance here.

    Read the article

  • PHP / MySQL - How to retrieve 2 separate sets of objects?

    - by Dan
    Hi, I have a set of models which correspond to tables in my database. I have been retrieving them easily enough, for example. $result = $mysqli->query('SOME SQL'); $post = $result->fetch_object; What would be the best approach for performing a join and also returning the related objects? For example, each post is created by a user, so for each row returned in the joined statement, both a page and user object should be returned. Any advice appreciated. Thanks.

    Read the article

  • What does the symbol :=: mean

    - by Dan Maguire
    I've found the symbol :=: in some Clarion code and I can't seem to figure out exactly what it does. The code was written by a previous developer many years ago, so I can't ask him. I also have not been able to find any results for "colon equals colon" in Google. Here is an example of the code, where bufSlcdpaDtl is a file object: lCCRecord Like(bufSlcdpaDtl),Pre(lCCRecord) ! ...other stuff... lCCRecord :=: bufSlcdpaDtl I'm wondering if it's something similar to ::= in Python or possibly the assignment operator :=.

    Read the article

  • How to access and run field events from extension js?

    - by Dan Roberts
    I have an extension that helps in submitting forms automatically for a process at work. We are running into a problem with dual select boxes where one option is selected and then that selection changes another field's options. Since setting an option selected property to true doesn't trigger the field's onchange event I am trying to do so through code. The problem I've run into is that if I try to access or run functions on the field object from the extension, I get the error Error: uncaught exception: [Exception... "Component is not available" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: chrome://webformsidebar/content/webformsidebar.js :: WebFormSidebar_FillProcess :: line 499" data: no] the line causing the error is... if (typeof thisField.onchange === 'function') The line right before it works just fine... thisField.options[t].selected=true; ...so I'm not sure why this is resulting in such an error. What surprises me most I guess is that checking for the existence of the function leads to an error. It feels like the problem is related to the code running in the context of the extension instead of the browser window document. If so, is there any way to call a function in the browser window context instead? Do I need to actually inject code into the page somehow? Any other ideas? Thanks

    Read the article

  • Focus behavior in Applet-Javascript interaction

    - by Dan
    I have a web page with an applet that opens a popup window and also makes Javascript calls. When that Javascript call results in a focus() call on an HTML input, that causes the browser window to push itself in front of the applet window. But only on certain browsers, namely MSIE. On Firefox the applet window remains on top. How can I keep that behavior consistent in MSIE? Note that using the old Microsoft VM for Java also achieves the desired (applet window in front) result. HTML code: <html> <head> <script type="text/javascript"> function focusMe() { document.getElementById('mytext').focus(); } </script> </head> <body> <applet id="myapplet" mayscript code="Popup.class" ></applet> <form> <input type="text" id="mytext"> <input type="button" onclick="document.getElementById('myapplet').showPopup()" value="click"> </form> </body> </html> Java code: public class Popup extends Applet { Frame frame; public void start() { frame = new Frame("Test Frame"); frame.setLayout(new BorderLayout()); Button button = new Button("Push Me"); frame.add("Center", button); button.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { frame.setVisible(false); } }); frame.pack(); } public void showPopup() { frame.setVisible(true); JSObject.getWindow(this).eval("focusMe()"); } }

    Read the article

  • How to get ANTLR 3.2 to exit upon first error?

    - by Dan Becker
    In section 10.4, The Definitive ANTLR reference tells you to override mismatch() & recoverFromMismatchedSet() if you want to exit upon the first parsing error. But, at least in ANTLR 3.2, it appears that there is no mismatch() method, and the recoverFromMismatchedSet() documentation says that it is "Not Currently Used". So it appears things have changed since the book was published. What am I supposed to do instead to exit upon the first parsing error in ANTLR 3.2?

    Read the article

  • What languages have a while-else type control structure, and how does it work?

    - by Dan
    A long time ago, I thought I saw a proposal to add an else clause to for or while loops in C or C++... or something like that. I don't remember how it was supposed to work -- did the else clause run if the loop exited normally but not via a break statement? Anyway, this is tough to search for, so I thought maybe I could get some CW answers here for various languages. What languages support adding an else clause to something other than an if statement? What is the meaning of that clause? One language per answer please.

    Read the article

  • How do I create an ImageView in java code, within an existing Layout?

    - by Dan T
    I'm looking for an easy way for the user to see how many drinks they've had for a BAC calculator. PICTURE OF THE APP, for reference On button press, I would like an image to be added to the screen, directly under the spinner and with left alignment. When I press the button again, I want another image to be added to the screen. So if I pressed the add beer button, a drawable of a beer would appear below the spinner. If I pressed the add beer button again, I want there to be TWO drawables of beers under the spinner, preferably with them being added from the right. (Also, having them reach their width limit, wrapping around, and starting again on the left, but below a full line, would be AWESOME) I can't figure out how to do this. I assume adding a ImageView in code to a relative layout (because it needs to be positioned to the right) would be the best route, but if it's possible in xml I'd be more than happy to use that. Any help?

    Read the article

  • ASP.NET Theme stylesheet rendering

    - by Dan Appleyard
    When a page with theme is rendered, the stylesheets link tags in the given theme are rendered right before the closing head tag. Does anyone know of a way to change that? Is there a way that I could have those tags be placed right after the opening head tag? Thanks!

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >