Daily Archives

Articles indexed Wednesday June 9 2010

Page 14/126 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • IStatelessSession insert object with many-to-one

    - by Andrew Kalashnikov
    Hello guys. I've got common mapping <class name="NotSyncPrice, Portal.Core" table='Not_sync_price'> <id name="Id" unsaved-value="0"> <column name="id" not-null="true"/> <generator class="native"/> </id> <many-to-one name="City" class="Clients.Core.Domains.City, Clients.Core" column="city_id" cascade="none"></many-to-one> <!--<property name="City"> <column name="city_id"/> </property>--> I want to use IStatelessSession for batch insert. But when i set city object to NotSyncPrice object and call IStatelessSession I've got strange exception: NHibernate.Impl.StatelessSessionImpl.get_Timestamp() When its null or int all is ok. I try use real && proxy city object. But no result. What's wrong:( Please help

    Read the article

  • problem with sql statement using vb.net

    - by newBie
    hi i got some problem i got this 3 line statement: Dim infoID As Integer = objCommand1.ExecuteScalar() Dim strSQL2 As String = "insert into feedBackHotel (infoID, feedBackView) values(" + infoID + ",'" + FeedBack + "')" Dim objCommand2 As New SqlCommand(strSQL2, conn) objCommand2.ExecuteNonQuery() the problem here is..the strSQL2 can capture the infoID from previous statement, but it didnt insert into the database. it will pop out this error "Conversion from string "insert into feedBackHotel (infoI" to type 'Double' is not valid." in both table related, use same data type (int) but for the feedBackHotel's infoID i allow it to be null..bcoz if i make it not null, it will show another error.. im using vb.net ..can anyone help?

    Read the article

  • What is the security risk of object reflection?

    - by Legend
    So after a few hours of workaround the limitation of Reflection being currently disabled on the Google App Engine, I was wondering if someone could help me understand why object reflection can be a threat. Is it because I can inspect the private variables of a class or are there any other deeper reasons?

    Read the article

  • Find UTC Offset given a city

    - by soccerfan
    In C++ on Windows, given a city, lets say london or newyork or sydney or singapore etc.. how do I find the UTC offset for each of them, ie the function should be able to accept a city name and return the UTC offset in the current scenario ie taking into account daylight savings. Any ideas how this can be done using win32 APIs

    Read the article

  • Column moved [finished] event in JTable

    - by chown
    How should I detect that column moved action is finished in JTable? I've added columnModeListener to my column model but the problem is columnMoved method is called every time a column moves (by certain pixels). I don't want this behavior. I just want to detect when the column dragging is finished. columnModel.addColumnModelListener(new TableColumnModelListener() { public void columnAdded(TableColumnModelEvent e) { } public void columnRemoved(TableColumnModelEvent e) { } public void columnMoved(TableColumnModelEvent e) { //this is called so many times //I don't want this, but something like column moved finished event System.out.println("Moved "+e.getFromIndex()+", "+e.getToIndex()); } public void columnMarginChanged(ChangeEvent e) { } public void columnSelectionChanged(ListSelectionEvent e) { } }); I hope it is clear what I'm looking for. Thanks.

    Read the article

  • Preventing Users From Copying Text From and Pasting It Into TextBoxes

    Many websites that support user accounts require users to enter an email address as part of the registration process. This email address is then used as the primary communication channel with the user. For instance, if the user forgets her password a new one can be generated and emailed to the address on file. But what if, when registering, a user enters an incorrect email address? Perhaps the user meant to enter [email protected], but accidentally transposed the first two letters, entering [email protected]. How can such typos be prevented? The only foolproof way to ensure that the user's entered email address is valid is to send them a validation email upon registering that includes a link that, when visited, activates their account. (This technique is discussed in detail in Examining ASP.NET's Membership, Roles, and Profile - Part 11.) The downside to using a validation email is that it adds one more step to the registration process, which will cause some people to bail out on the registration process. A simpler approach to lessening email entry errors is to have the user enter their email address twice, just like how most registration forms prompt users to enter their password twice. In fact, you may have seen registration pages that do just this. However, when I encounter such a registration page I usually avoid entering the email address twice, but instead enter it once and then copy and paste it from the first textbox into the second. This behavior circumvents the purpose of the two textboxes - any typo entered into the first textbox will be copied into the second. Using a bit of JavaScript it is possible to prevent most users from copying text from one textbox and pasting it into another, thereby requiring the user to type their email address into both textboxes. This article shows how to disable cut and paste between textboxes on a web page using the free jQuery library. Read on to learn more! Read More >

    Read the article

  • June LCNUG Presentation

    - by Tim Murphy
    Office Open XML has been my focus for the last 8 months.  We are creating  solutions that generate data and business rule heavy presentations and document.  On June 24th I will be covering the how to use OOXML to generate documents that can be used as sales and marketing collateral.  Register below and come out and join the discussion. http://www.eventbrite.com/event/722041646 del.icio.us Tags: Office Open XML,OOXML PSC Group,LCNUG,Document Generation

    Read the article

  • Silverlight Cream for June 08, 2010 -- #877

    - by Dave Campbell
    In this Issue: Miroslav Miroslavov, Chris Klug, Beau, Christian Schormann(-2-), Dan Wahlin, Pete Brown, Michael S. Scherotter, Philipp Sumi, Andy Wigley, and Phil Middlemiss. Shoutouts: Mark Tucker set about learning Caliburn, and in the process is writing a Caliburn Book: Chapters 1-3 Jesse Liberty has a great link-laden post up about why we should all be learning/using Blend: Why Developers Should, Must, Do Care About The New Expression Blend be sure to read what he says about WP7 development, however! Charlie Kindel announced an Install problem with the Developer Tools CTP Refresh and the WP7 tools... check this out if you're having problems. John Papa has a good post up on the happenings yesterday: Expression Studio 4 Launch of Blend, SketchFlow, Encoder and More! Erik Mork & Company's latest "This Week in Silverlight" is titled First Drop: Prism v4 – First Drop is Available From SilverlightCream.com: Animated navigation between Pages Miroslav Miroslavov has Part 8 of his "Silverlight in Action" series up, detailing cool things from the CompleteIT site... this one is on Animated navigation between pages. Subtitling videos Chris Klug got a gig adding subtitles to videos for Microsoft (sweet) ... and no, not *that* kind of subtitles... read how he approached the final solution. Silverlight Watermark TextBox I'm not sure we can have too many Watermark TextBoxes, and neither does Beau , who sent me a link to this one... give it a dance and decide. Blend 4: Collaborative SketchFlow Feedback with SharePoint With the new Blend release, Christian Schormann has a post up describing the lashup to Sharepoint for sharing Sketchflow and getting feedback. New Utility, Links, and Tutorials for Path-Based Layout Christian Schormann also has a collection of resources for Path-Based Layouts, including a utility "that lets you apply a whole bunch of position-specific effects without having to write any code"... lots of links to resources here. Tales from the Trenches – Building a Real-World Silverlight Line of Business Application Dan Wahlin draws on his recent experience and lays out some of the fun and pitfalls of building LOB apps in Silverlight... WCF, MVVM, slides, and code included WPF (and Silverlight): Choose your Fonts and Text Rendering Options Wisely Pete Brown has a great post up on using fonts wisely across multiple platforms... lots of info and good discussion in the comments as well. Ball Watch USA Remember the awesome watch Michael S. Scherotter did in Silverlight 1 and then converted to Updated Ball Trainmaster Cannonball Watch to Silverlight 2? Well... there's now a contest underfoot and 8 videos to help you get started... all good stuff, and good luck! ... Michael has a post up about the contest: Enter to Win a Ball Watch by Creating One in Silverlight Announcing Sketchables – Rapid Mockup Creation with SketchFlow By way of Jesse Libertyhttp://jesseliberty.com/2010/06/08/why-developers-should-must-do-care-about-the-new-expression-blend/, this is a cool production by Philipp Sumi about a simple mockup framework he's created. Perst - a database for Windows Phone 7 Silverlight I think one of my first comments to Michael Washington back at the MVP Summit 2010 was that we'd need a database engine, and too cool, but we've got one, Andy Wigley discusses Perst in this post... to save you some time, here's the Perst site A Chrome and Glass Theme - Part 7 Phil Middlemiss has part 7 of his great theme-building series up... this time he's giving the accordian control a once-over. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • gprof and execl() - is it possible?

    - by Chris
    Background: I have a game (an old-school-esque MUD) which I've been attempting to profile with gprof. The documentation of gprof (on Linux 2.6) states that The profiled program must call "exit"(2) or return normally for the profiling information to be saved in the gmon.out file. Now, if I kill the server with the shutdown command, the application "returns normally" (i.e., main() returns) and I get a gmon.out to analyze. However, it's far more common to reboot the server. The reboot command does the following: Writes usernames and socket FD numbers to disc. Makes a call to execl(). The new process looks for the stored data, picks up the FDs, and moves on. I see the following error on the command line, as the whole process fails: Profiling timer expired ./program Question: Is it possible to get a gmon.out file from the execl()-calling process? Perhaps some environmental parameter to execl(), or else perhaps a different, gprof-friendly, system call to achieve the same effect (beginning a new process while preserving file descriptors)?

    Read the article

  • What HTTP headers are required to refresh a page on back button.

    - by cantabilesoftware
    I'm trying to get a page to refresh when navigated to from the back button. From what I understand after reading around a bit I should just need to mark the page as uncacheable but I can't get any browsers to refresh the page. These are the headers I've currently got: Cache-Control:no-cache Connection:keep-alive Content-Encoding:gzip Content-Length:1832 Content-Type:text/html; charset=utf-8 Date:Mon, 07 Jun 2010 14:05:39 GMT Expires:-1 Pragma:no-cache Server:Microsoft-IIS/7.5 Vary:Accept-Encoding Via:1.1 smoothwall:800 (squid/2.7.STABLE6) X-AspNet-Version:2.0.50727 X-AspNetMvc-Version:2.0 X-Cache:MISS from smoothwall X-Powered-By:ASP.NET Why would the browser pull this page from it's browser history and not refresh it?

    Read the article

  • Clean solution to this ruby iterator trickiness?

    - by mstksg
    k = [1,2,3,4,5] for n in k puts n if n == 2 k.delete(n) end end puts k.join(",") # Result: # 1 # 2 # 4 # 5 # [1,3,4,5] # Desired: # 1 # 2 # 3 # 4 # 5 # [1,3,4,5] This same effect happens with the other array iterator, k.each: k = [1,2,3,4,5] k.each do |n| puts n if n == 2 k.delete(n) end end puts k.join(",") has the same output. The reason this is happening is pretty clear...Ruby doesn't actually iterate through the objects stored in the array, but rather just turns it into a pretty array index iterator, starting at index 0 and each time increasing the index until it's over. But when you delete an item, it still increments the index, so it doesn't evaluate the same index twice, which I want it to. This might not be what's happening, but it's the best I can think of. Is there a clean way to do this? Is there already a built-in iterator that can do this? Or will I have to dirty it up and do an array index iterator, and not increment when the item is deleted?

    Read the article

  • Facebook API: like a photo

    - by QuinnBaetz
    In the Facebook API (REST), how do you like a photo? There's a stream.addLike function, but you need the post_id, and I don't see a way to get the post_id of a photo (not the same as the pid or the object_id).

    Read the article

  • Class 'org.springframework.http.converter.ResourceHttpMessageConverter' not found - how to correct?

    - by Ash Kim
    Eclipse STS is reporting I have problem with my spring project. It's a fresh project generated from the Spring Web MVC Project Template (File-New-Spring Template Project-Spring Web MVC ). When I create the project it has no problems - it's only once I modify the pom (by adding the hibernate dependencies) that STS then picks up the spring problem. Strangely if I revert the pom the problem remains. Also I can run the project on a spring tc server and all works correctly. Any ideas how I can satisfy this problem report? "Class 'org.springframework.http.converter.ResourceHttpMessageConverter' not found" mvc-config.xml /src/main/webapp/WEB-INF/spring line 9 Spring Beans Problem mvc-config.xml: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"> <mvc:annotation-driven /> <!-- <= PROBLEMATIC LINE REPORTED BY STS --> <!-- Resolves view names to protected .jsp resources within the /WEB-INF/views directory --> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/WEB-INF/views/"/> <property name="suffix" value=".jsp"/> </bean> </beans>

    Read the article

  • Programming for a 32-bit environment vs programming for a 64-bit environment / Build configurations

    - by Russel
    I was looking at some same code (a sample MS Visual Studio C++ project) recently with multiple build configurations (Release/Debug, Win32/x64). My question: What is the difference? I guess I understand Release/Debug (Release = finalized version of project, Debug = version used to run in debugger), but what things need to be considered when building different versions for Win32/x64 platforms? Is there any coding differences, or does this just affect how that same code is ultimately built into machine code? I know there are different library files depending on whether you're using a 32-bit or 64-bit system as well... Are all of these differences again just machine code? Would a 32-bit library file and its corresponding 64-bit library file be two files with exactly the same functions build from the same source code originally, and only differing in their machine code implementation? Thanks! --Russel

    Read the article

  • Facebook Connect for iPhone persistant login

    - by Sam
    Hi, I have implemented Facebook Connect in my iPhone project and it is working great. The only problem I have is that every time the user closes the app, the next time they load it they have to re-enter their username and password to login even if the 'keep me logged in' box is checked. My question is is there a way to save the user's session so next time the app is launched they are automatically logged into Facebook Connect without any prompts? Thanks!

    Read the article

  • FOSS ASP.Net Session Replication Solution?

    - by jsight
    I've been searching (with little success) for a free/opensource session clustering and replication solution for asp.net. I've run across the usual suspects (indexus sharedcache, memcached), however, each has some limitations. Indexus - Very immature, stubbed session interface implementation. Its otherwise a great caching solution, though. Memcached - Little replication/failover support without going to a db backend. Several SF.Net projects - All aborted in the early stages... nothing that appears to have any traction, and one which seems to have gone all commercial. Microsoft Velocity - Not OSS, but seems nice. Unfortunately, I didn't see where CTP1 supported failover, and there is no clear roadmap for this one. I fear that this one could fall off into the ether like many other MS dev projects. I am fairly used to the Java world where it is kind of taken for granted that many solutions to problems such as this will be available from the FOSS world. Are there any suitable alternatives available on the .Net world?

    Read the article

  • Checking Selected Radio Button after POST

    - by coffeeaddict
    I've been using ASP.NET controls which perform a lot of the manual for you. But I'm going back to the basics, what everyone else does. I'm using standard input tags. So for example if I have a radio button group and I select a button. When the form submits and does a POST back to whatever action="MyPage.aspx" then to grab and check the radio button's value that was selected is it always done like this below? <label><input type="radio" name="rbGroup" value='<%# ((Action)Container.DataItem).ID %>'/><%# ((Action)Container.DataItem).Name %></label> So here I'm appending the ID to the value. And then when it hits the page that my action specifies, I'm checking to see which was selected by trimming off and getting that ID from the value: string selection = Request.Form["rbGroup"]; string dbRecordIdSelected = int.Parse(selection.Substring(1)); so now I can check the id they selected...that is the ID of the db record that gave that selected radio it's name. Is that how you basically always check what radio was selected by checking the name/value pair that comes across for that selected radioButton group name? And then you can append stuff like IDs or whatever you want to grab and parse out to then do additional logic on the server-side once that header reaches the server and your specified page in the action attribute? The above code is not production code, just something to explain what I'm talking about.

    Read the article

  • IE8 is still caching my requests even with mathrandom.

    - by Ozaki
    TLDR IE is still caching my requests even with Math.random() included in the URL. So I added math random onto the end of my url: var MYKMLURL = 'http://' + host + 'data/pattern?key='+ Math.random(); I also added math random onto my function param: window.setTimeout(RefreshPatternData, 1000, MYKMLLAYER); function RefreshPatternData(layer) { layer.loaded = false; layer.setVisibility(true); layer.refresh({ force: true, params: { 'key': Math.random()} }); setTimeout(RefreshPatternData, 30000, MYKMLLAYER); } So the request appears as http://host/data/pattern?key=35678652545 etc. It changes everytime the request is made. It works in Firefox & Chrome & Safari etc. But IE8 is still caching the data and not updating my layer. Any ideas as to why this might be occuring?

    Read the article

  • Workflows not starting after fresh install

    - by Greg McGuffey
    I just installed Dynamics CRM 4.0. It is working nicely except for workflows. They won't start. I turned on tracing and it appears that there is an IO error. The server is setup with IFD and SSL. No issues accessing it internally or externally. Here is the trace: # CRM Tracing Version 2.0 # LocalTime: 2010-06-08 11:34:58.2 # Categories: # CallStackOn: No # ComputerName: FOX-CRM1 # CRMVersion: 4.0.7333.2741 # DeploymentType: OnPremise # ScaleGroup: # ServerRole: AppServer, AsyncService, DiscoveryService, WebService, ApiServer, HelpServer, DeploymentService [2010-06-08 11:34:58.2] Process:CrmAsyncService |Organization:821a137e-7191-49a4-86cc-69101e2b6d20 |Thread: 24 |Category: Platform.Async |User: 00000000-0000-0000-0000-000000000000 |Level: Error | AsyncOperationCommand.Execute >Exception while trying to execute AsyncOperationId: {DF68F483-2C73-DF11-9A34-18A9053B7B38} AsyncOperationType: 1 - System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: The handshake failed due to an unexpected packet format. at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) at System.Net.TlsStream.CallProcessAuthentication(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size) at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size) at System.Net.ConnectStream.WriteHeaders(Boolean async) --- End of inner exception stack trace --- at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request) at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at Microsoft.Crm.SdkTypeProxy.CrmService.Retrieve(String entityName, Guid id, ColumnSetBase columnSet) at Microsoft.Crm.Asynchronous.SdkTypeProxyCrmServiceWrapper.Retrieve(String entityName, Guid id, ColumnSetBase columnSet) at Microsoft.Crm.Asynchronous.SdkPluginDescriptionProvider.GetPluginTypeDescription(Guid pluginTypeId, IOrganizationContext context) at Microsoft.Crm.Caching.PluginTypeCacheLoader.LoadCacheData(Guid key, IOrganizationContext context) at Microsoft.Crm.Caching.CrmMultiOrgCache`2.CreateEntry(TKey key, IOrganizationContext context) at Microsoft.Crm.Caching.CrmSharedMultiOrgCache`2.LookupEntry(TKey key, IOrganizationContext context) at Microsoft.Crm.Caching.PluginTypeCache.LookupEntry(Guid pluginTypeId, IOrganizationContext context) at Microsoft.Crm.Asynchronous.AsyncOperationCommand.GetPluginType(Guid pluginTypeId) at Microsoft.Crm.Asynchronous.EventOperation.InternalExecute(AsyncEvent asyncEvent) at Microsoft.Crm.Asynchronous.AsyncOperationCommand.Execute(AsyncEvent asyncEvent) The only thing I've tried to to update the AsyncSdkRootDomain row in the Deployment table to match the ADSdkRootDomain and the ADApplicationRootDomain values. It was blank. That didn't appear to work. After some more research, I think this might be caused because the Asynch service can't access the SDK web services using SSL. If this is correct, how would one configure a CRM server for secure access, internal and external (IFD) and still allow asynch service to hit web site? Thanks for your help!

    Read the article

  • SimpleModal Strange ASP.NET Button problem

    - by bhsstudio
    Hi I have the following codes $('#<%= btnOpen.ClientID %>').click(function() { $('#content').modal(); }); <asp:Button ID="btnOpen" runat="server" Text="Open" /> When I click on the button, the modal window will appear for about 0.5 second and disappear right away.Can anyone help me please? Thanks a lot!

    Read the article

  • Where are the clever uses of strict evaluation?

    - by devonrt
    It seems like there are plenty of examples of clever things being done in a lazily-evaluated language that can't be done in an environment with strict evaluation. For example infinite lists in Haskell or replacing every element in a tree with the tree's minimum value in one pass. Are there any examples of clever things being done in a strictly-evaluated language that can't easily be done in a lazily-evaluated language?

    Read the article

  • How deep are your unit tests?

    - by John Nolan
    The thing I've found about TDD is that its takes time to get your tests set up and being naturally lazy I always want to write as little code as possible. The first thing I seem do is test my constructor has set all the properties but is this overkill? My question is to what level of granularity do you write you unit tests at? ..and is there a case of testing too much?

    Read the article

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