Daily Archives

Articles indexed Friday June 18 2010

Page 26/76 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • C# DateTime Class and Datetime in database

    - by Spyros
    Hello . I have the following problem. I have an object with some DateTime properties , and a Table in database that I store all that objects , in Sql server I want to store the DateTime properties in some columns of DateTime Datatype, but the format of datetime in sql server is different from the DateTime class in c# and I got an sql exception saying "DateTime cannot be parsed". I know how to solve this by making the format yyyy-MM-dd but is this the proper and best solution to do this?

    Read the article

  • Change table row using Rails Ajax

    - by xopht
    I've a simple page with link_to_remote Rails Ajax function and HTML table. I'd like to change row of the table when click that link. This is my html. <table border="1"> <tr> <td><div id="ajax_result_1">1</div></td> <div id="ajax_result_2"><td>2</td></div> </tr> <div id="ajax_result_3"> <tr> <td>3</td> <td>4</td> </tr> </div> </table> And this is my code. <%= link_to_remote 'Change', :update => "ajax_result_1", :url => "change_path" %> change action just render simple text. When I use ajax_result_1 for :update, it worked okay. But, not for *ajax_result_2* and *ajax_result_3*. Is there a way to solve this? I want to replace row of the table.

    Read the article

  • Is there a ways to make google store coordinates in the android map?

    - by Pavel
    Hi. I'm in the middle of developing android app using google map. My question is - how to store coordinates with google map and display them later on? I know how to use canvas, how to draw it etc. but I want to store those coordinates with google map - just like with the google maps feature on internet. When I log in I can see points I've put on the map straight away. Can someone please tell me how to do that? There must be a way. Any answers greatly appreciated!

    Read the article

  • Why do we need to use out keyword while calling a method

    - by Midhat
    When a method is defined with an out parameter, why do I have to specify the out keyword when calling it. Its already there in the method definition, and the runtime should know that any parameter passed will be an out parameter. It would make sense if the compiler will accept the argument with or without out keyword, with different semantic, but if you MUST add the keyword to make the code compile, whats the use? Shouldn't the compiler handle it automatically? Same for ref

    Read the article

  • HTML5 click event

    - by RichadC
    I made an array of squares ctx.fillStyle = "rgb(0,0,0)"; for(x=0;x<=25;x++){ for(y=0;y<=25;y++){ ctx.fillRect(x, y, 20, 20); } } and I want a square to change its colour when clicked. How can I do that? I'm don't know much HTML5 and need some help. Thanks

    Read the article

  • how do i check if multiple folders exist if so delete them on button click?

    - by NightsEVil
    hi i have a few folders created by my application and id like that when they click a button named "clean up" that it would check to see if any of the predetermined folders exist, if they do then delete them, this is what i have tried so far whats wrong with it? string tempFolder = Environment.GerFolderPath(Environment.SpecialFolder.ApplicationData); if (Directory.Exists(tempFolder + "//" + "temp1")) if (Directory.Exists(tempFolder + "//" + "temp2")) if (Directory.Exists(tempFolder + "//" + "temp3")) if (Directory.Exists(tempFolder + "//" + "temp4")) { System.IO.Directory.Delete(tempFolder + "\\" + "temp1", true); System.IO.Directory.Delete(tempFolder + "\\" + "temp2", true); System.IO.Directory.Delete(tempFolder + "\\" + "temp3", true); System.IO.Directory.Delete(tempFolder + "\\" + "temp4", true); } else { MessageBox.Show("No Cleanup Needed"); } so whats wrong? i tested it and it seemed to with 2 folder but not 4 or more

    Read the article

  • Matching Strings: a biological perspective

    - by sun
    Write a function, called constrainedMatchPair which takes three arguments: a tuple representing starting points for the first substring, a tuple representing starting points for the second substring, and the length of the first substring. The function should return a tuple of all members (call it n) of the first tuple for which there is an element in the second tuple (call it k) such that n+m+1 = k, where m is the length of the first substring. Complete the definition def constrainedMatchPair(firstMatch,secondMatch,length):

    Read the article

  • Advanced Data Grid sorting

    - by Ravi K Chowdary
    Hi, I have using AdvancedDataGrid and using sorting fucntionality. By default the grid sorting is decending. I want to make a sorting is ascending. I write a sorting function and click on the header on the advanced datagrid, the first and second time it is not working ,it is working on thrid time. It is not remembering the first sorting call. It is remember the call after 3 clicks. Please any one of you can answer it asap. Thanks, ravi

    Read the article

  • DotNetNuke Page module - Silverlight Edition

    As part of the DotNetNuke Hackathon at the Capital DotNetNuke User Group on June 16th, I discussed using Silverlight to create rich DotNetNuke modules. The example that I presented was a work in progress which Ill be working on during the course of the Hackathon, even as participants are working on their own submissions. Youll be able to follow along with my progress over the next few days as I continue to flesh out the module. The module that I am working on is a Silverlight based replacement...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • NZ Herald/ Yahoo Daily Deals Delivered via Web Slices in IE8

    Recently I have been having a lot of fun building a competition Slice of Kevin intended in part to teach people about Web Slices in New Zealand. The competition has been very successful and has created a loyal group of users. Since launch 2 months ago we have had 26,843 users of the slice. Each of those users have spent on average 4.1 hrs each engaged inside the web slice over that time. We also reached out through social media and found that facebook worked as a perfect companion to the Web Slice...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • DotNetNuke 5.4.3 Released

    I am pleased to announce the release of DotNetNuke 5.4.3. This months maintenance release focused on resolving major issues with page management and with the Telerik HTML Editor Provider. The page management fixes should resolve all major outstanding issues in this area. The HTML Editor Provider fixes addressed some of the larger issues with the provider, although we recognize there are still several fixes and enhancements that remain for this particular item which we hope to address in the upcoming...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Rails - embedded polymorphic comment list + add comment form - example?

    - by odigity
    Hey, all. Working on my first Rails app. I've searched all around - read a bunch of tutorials, articles, and forum posts, watched some screencasts, and I've found a few examples that come close to what I'm trying to do (notably http://railscasts.com/episodes/154-polymorphic-association and ep 196 about nested model forms), but not exactly. I have two models (Podcast and BlogPost) that need to be commentable, and I have a Comment model that is polymorphically related to both. The railscasts above had a very similar example (ep 154), but Ryan used a full set of nested routes, so there were specific templates for adding and editing comments. What I want to do is show the list of comments right on the Podcast or BlogPost page, along with an Add Comment form at the bottom. I don't need a separate add template/route, and I don't need the ability to edit, only delete. This is a pretty common design on the web, but I can't find a Rails example specifically about this pattern. Here's my current understanding: I need routes for the create and delete actions, of course, but there are no templates associated with those. I'm also guessing that the right approach is to create a partial that can be included at the bottom of both the Podcast and BlogPost show template. The logical name for the partial seems to me to be something like _comments.html.haml. I know it's a common convention to have the object passed to the partial be named after the template, but calling the object 'comments' seems to not match my use case, since what I really need to pass is the commentable object (Podcast or BlogPost). So, I guess I'd use the locals option for the render partial call? (:commentable = @podcast). Inside the partial, I could call commentable.comments to get the comments collection, render that with a second partial (this time with the conventional use case, calling the partial _comment.html.haml), then create a form that submits to... what? REST-wise, it should be a POST to the collection, which would be /podcast|blogpost/:id/comments, and I think the helper for that is podcast_comments_path(podcast) if it were a podcast - not sure what to do though, since I'm using polymorphic comments. That would trigger the Comment.create action, which would then need to redirect back to the podcast|blogpost path /podcast|blogpost/:id. It's all a bit overwhelming, which is why I was really hoping to find a screencast or example that specifically implements this design.

    Read the article

  • Flex4 Application state in a custom component

    - by itarato
    Hi, I'm porting my Flex3 app to Flex4 (FlashBuilder4). I get the whole new state concept, except one thing. In a custom component (separate mxml file) I'm using the main level Application's state. In Flex3 it was: <mx:State name="only_view_mode"> <mx:RemoveChild target="{myComponent.button1}" /> </mx:State> In Flex4 it should be something like that: <mx:State name="only_view_mode" /> and <mx:LinkButton id="button1" excludeFrom="???" /> My question is: how can I access to an Application state from a component? I checked the official reference (http://www.adobe.com/go/learn_flex4_alldocumentation_en) and Google of course but without any success. Thanks in advance

    Read the article

  • Runing bcdedit from python in Windows 2008 SP2

    - by Lee-Man
    I do not know windows well, so that may explain my dilemma ... I am trying to run bcdedit in Windows 2008R2 from Python 2.6. My Python routine to run a command looks like this: def run_program(cmd_str): """Run the specified command, returning its output as an array of lines""" dprint("run_program(%s): entering" % cmd_str) cmd_args = cmd_str.split() subproc = subprocess.Popen(cmd_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) (outf, errf) = (subproc.stdout, subproc.stderr) olines = outf.readlines() elines = errf.readlines() if Options.debug: if elines: dprint('Error output:') for line in elines: dprint(line.rstrip()) if olines: dprint('Normal output:') for line in olines: dprint(line.rstrip()) errf.close() outf.close() res = subproc.wait() dprint('wait result=', res) return (res, olines) I call this function thusly: (res, o) = run_program('bcdedit /set {current} MSI forcedisable') This command works when I type it from a cmd window, and it works when I put it in a batch file and run it from a command window (as Administrator, of course). But when I run it from Python (as Administrator), Python claims it can't find the command, returning: bcdedit is not recognized as an internal or external command, operable program or batch file Also, if I trying running my batch file from Python (which works from the command line), it also fails. I've also tried it with the full path to bcdedit, with the same results. What is it about calling bcdedit from Python that makes it not found? Note that I can call other EXE files from Python, so I have some level of confidence that my Python code is sane ... but who knows. Any help would be most appreciated.

    Read the article

  • Any picture Gallery Control for .NET 1.1 in WinForms?

    - by Romias
    I need a UserControl to display pictures as a Gallery in Winforms. I have my pictures as a Image Collection but no problem to change to fit Control capabilities. It could be nice if it is for .NET 1.1 but since I'm planning to migrate all our code to 2.0 if the control is in that framework it could be useful in the future If it is free much better :) Does any of you know a control like this? Thanks!

    Read the article

  • How to perform a join with CodeIgniter's Active Record class on a multicolumn key?

    - by Scott Southworth
    I've been able to make this code work using CodeIgniter's db->query as follows: $sql = 'SELECT mapping_code,zone_name,installation_name FROM installations,appearances,zones WHERE installations.installation_id = zones.installation_fk_id AND appearances.installation_fk_id = installations.installation_id AND appearances.zone_fk_id = zones.zone_id AND appearances.barcode = ? '; return $this->db->query($sql,array($barcode)); The 'appearances' table throws a 'not unique table' error if I try this using the Active Record class. I need to join appearances on both the zone and installations tables. How can I do this?

    Read the article

  • Using an XML Catalog with a Java library that uses JAXP internally

    - by Brian Ferris
    I'm using the Apache web service xml rpc library to make requests to an rpc service. Somewhere in that process is a xml document with a DTD reference to http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd, which the library attempts to download when parsing the XML. That download fails with a 503 status code because the w3c is blocking repeated downloads of this largely static document from Java clients. The solution is XML Catalogs to locally cache the DTD. However, while I can find examples of setting an EntityHandler on a JAXP SAXParser instance directly to enable catalog parser support, I don't actually have access to the underlying parser here. It's just being used by the xml rpc library. Is there any way I can set a global property or something that will tell JAXP to use XML catalogs?

    Read the article

  • Automatic incremental SQL Script generation for incremental, nightly builds when using Team Build in

    - by Steve Johnson
    hi all, hope that everybody here is OK. We are using VS 2008 as development tool, TFS 2008 as version control as well as build automation. Some of our developer use dbpro for databases changes and some use SQL Server management studio. I am trying to automate build for Web Application built using C# and VB.Net. Our scenario is such that we have a central database to which our web application connects. Whenever we supply our clients with a new functionality or a bug fix, we supply them incremental builds. The SQL script is checked into source control for every incremental build when they have made and tested there changes on our central DB Server. I want to generate Differential script that can be run at the client as an incremental update script. Now to come about it is a problem. Sometimes our developers tend to forget the database change-sets and the script in the source control is missing an SP or a two. Also, sometimes we need to insert default data into some of the tables that have strict stringent values and not test values. Like a table that contains Services provided by the panel, we add a new service name, signature, credentials and service address, etc etc in the ServiceTable. Besides this many other tables may have test data that may not be needed. If we use DataCompare, it will generate changeset for required data (important for client to enable certain services) and our test data that was added to the database as a result of our testing of the functionality or bug fix. Currently i am using SQLSchemaCompareTask (from Visual Studio 2008 Team Database Professional Power Tools API) in the TFSBuild.proj file of the build definition for TFS 2008. Using SQLSchemaCompareTask, the script generated contains database names like [dbo]. etc which are not desired as the script fails when run against SQL Server 2000 databses (Some of our client still use SQL Server 2000) databases as teh backend of the application. Also default data can't be generated by this process. To overcome this problem, i have to come up with a solution that can compare databases and generate script automatically that does not have to be manually reviewed again before being sent to the client. Please suggest effective methodology of such SQL script generation and suggest whether two different databases may be used or something ? Is there any toolkit or api that can enable build automation for SQL Server databases? Thank you all. Regards Steve

    Read the article

  • Jython java call throws exception asking for 2 args when only one arg is coded

    - by clutch
    I have an Java method I want to call within my Jython servlet running on tomcat5. It looks like this: @SuppressWarnings("unchecked") public School loadByName(String name) { List<School> school; school = getHibernateTemplate().find("from " + getPersistentClass().getName() + " where name = ?", name); return uniqueResult(school); } I call it in Jython using: foobar = SchoolDAOHibernate.loadByName('Univeristy') It throws an error that says loadByName() expects 2 args; got 1. What other argument could it be looking for?

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >