Search Results

Search found 313 results on 13 pages for 'funky dude'.

Page 7/13 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Python unicode Decode Error SUDs

    - by PylonsN00b
    OK so I have # -*- coding: utf-8 -*- at the top of my script and it worked for being able to pull data from the database that had funny chars(Ñ ,Õ,é,—,–,’,…) in it and store that data into variables...but I have run into other problems, see I pull my data, organize it, and then dump it into a variables like so: title = product[1] Where product[1] is from my database result set Then I load it up for Suds like so: array_of_inventory_item_submit = ca_client_inventory.factory.create('ArrayOfInventoryItemSubmit') for product in products: inventory_item_submit = ca_client_inventory.factory.create('InventoryItemSubmit') inventory_item_list = get_item_list(product) inventory_item_submit = [inventory_item_list] array_of_inventory_item_submit.InventoryItemSubmit.append(inventory_item_submit) #Call that service baby! ca_client_inventory.service.SynchInventoryItemList(accountID, array_of_inventory_item_submit) Where get_item_list sets product[1] to title and (including a whole bunch of other nodes): inventory_item_submit.Title = title So everything runs fine until I call ca_client_inventory.service.SynchInventoryItemList that contains array_of_inventory_item_submit which contains the title w/ the funky char...here is the error: Traceback (most recent call last): File "upload_all_inventory_ebay.py", line 421, in <module> ca_client_inventory.service.SynchInventoryItemList(accountID, array_of_inventory_item_submit) File "build/bdist.macosx-10.6-i386/egg/suds/client.py", line 539, in __call__ File "build/bdist.macosx-10.6-i386/egg/suds/client.py", line 592, in invoke File "build/bdist.macosx-10.6-i386/egg/suds/bindings/binding.py", line 118, in get_message File "build/bdist.macosx-10.6-i386/egg/suds/bindings/document.py", line 63, in bodycontent File "build/bdist.macosx-10.6-i386/egg/suds/bindings/document.py", line 105, in mkparam File "build/bdist.macosx-10.6-i386/egg/suds/bindings/binding.py", line 260, in mkparam File "build/bdist.macosx-10.6-i386/egg/suds/mx/core.py", line 62, in process File "build/bdist.macosx-10.6-i386/egg/suds/mx/core.py", line 75, in append File "build/bdist.macosx-10.6-i386/egg/suds/mx/appender.py", line 102, in append File "build/bdist.macosx-10.6-i386/egg/suds/mx/appender.py", line 243, in append File "build/bdist.macosx-10.6-i386/egg/suds/mx/appender.py", line 182, in append File "build/bdist.macosx-10.6-i386/egg/suds/mx/core.py", line 75, in append File "build/bdist.macosx-10.6-i386/egg/suds/mx/appender.py", line 102, in append File "build/bdist.macosx-10.6-i386/egg/suds/mx/appender.py", line 298, in append File "build/bdist.macosx-10.6-i386/egg/suds/mx/appender.py", line 182, in append File "build/bdist.macosx-10.6-i386/egg/suds/mx/core.py", line 75, in append File "build/bdist.macosx-10.6-i386/egg/suds/mx/appender.py", line 102, in append File "build/bdist.macosx-10.6-i386/egg/suds/mx/appender.py", line 298, in append File "build/bdist.macosx-10.6-i386/egg/suds/mx/appender.py", line 182, in append File "build/bdist.macosx-10.6-i386/egg/suds/mx/core.py", line 75, in append File "build/bdist.macosx-10.6-i386/egg/suds/mx/appender.py", line 102, in append File "build/bdist.macosx-10.6-i386/egg/suds/mx/appender.py", line 243, in append File "build/bdist.macosx-10.6-i386/egg/suds/mx/appender.py", line 182, in append File "build/bdist.macosx-10.6-i386/egg/suds/mx/core.py", line 75, in append File "build/bdist.macosx-10.6-i386/egg/suds/mx/appender.py", line 102, in append File "build/bdist.macosx-10.6-i386/egg/suds/mx/appender.py", line 198, in append File "build/bdist.macosx-10.6-i386/egg/suds/sax/element.py", line 251, in setText File "build/bdist.macosx-10.6-i386/egg/suds/sax/text.py", line 43, in __new__ UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 116: ordinal not in range(128) Now what? My guess is my script can take in these funky chars because I have # -*- coding: utf-8 -*- at the top but Suds does NOT have that at the top of its files. Do I really want to go and change the Suds files...we all know this is the least desired last possible solution...what can I do?

    Read the article

  • Using ASP.NET MVC 2 with Ninject 2 from scratch

    - by Rune Jacobsen
    I just did File - New Project last night on a new project. Ah, the smell of green fields. I am using the just released ASP.NET MVC 2 (i.e. no preview or release candidate, the real thing), and thought I'd get off to a good start using Ninject 2 (also released version) with the MVC extensions. I downloaded the MVC extensions project, opened it in VS2008Sp1, built it in release mode, and then went into the mvc2\build\release folder and copied Ninject.dll and Ninject.Web.Mvc.dll from there to the Libraries folder on my project (so that I can lug them around in source control and always have the right version everywhere). I didn't include the corresponding .xml files - should I? Do they just provide intellisense, or some other function? Not a big deal I believe. Anyhoo, I followed the most up-to-date advice I could find; I referenced the DLLs in my MVC2 project, then went to work on Global.asax.cs. First I made it inherit from NinjectHttpApplication. I removed the Application_Start() method, and overrode OnApplicationStarted() instead. Here is that method: protected override void OnApplicationStarted() { base.OnApplicationStarted(); AreaRegistration.RegisterAllAreas(); RegisterRoutes(RouteTable.Routes); // RegisterAllControllersIn(Assembly.GetExecutingAssembly()); } And I also followed the advice of VS and implemented the CreateKernel method: protected override Ninject.IKernel CreateKernel() { // RegisterAllControllersIn(Assembly.GetExecutingAssembly()); return new StandardKernel(); } That is all. No other modifications to the project. You'll notice that the RegisterAllControllersIn() method is commented out in two places above. I've figured I can run it in three different combinations, all with their funky side effects; Running it like above. I am then presented with the standard "Welcome to ASP.NET MVC" page in all its' glory. However, after this page is displayed correctly in the browser, VS shows me an exception that was thrown. It throws in NinjectControllerFactory.GetControllerInstance(), which was called with a NULL value in the controllerType parameter. Notice that this happens after the /Home page is rendered - I have no idea why it is called again, and by using breakpoints I've already determined that GetControllerInstance() has been successfully called for the HomeController. Why this new call with controllerType as null? I really have no idea. Pressing F5 at this time takes me back to the browser, no complaints there. Uncommenting the RegisterAllControllersIn() method in CreateKernel() This is where stuff is really starting to get funky. Now I get a 404 error. Some times I have also gotten an ArgumentNullException on the RegisterAllControllersIn() line, but that is pretty rare, and I have not been able to reproduce it. Uncommenting the RegisterAllControllers() method in OnApplicationStarted() (And putting the comment back on the one in CreateKernel()) Results in behavior that seems exactly like that in point 1. So to keep from going on forever - is there an exact step-by-step guide on how to set up an MVC 2 project with Ninject 2 (both non-beta release versions) to get the controllers provided by Ninject? Of course I will then start providing some actual stuff for injection (like ISession objects and repositories, loggers etc), but I thought I'd get this working first. Any help will be highly appreciated! (Also posted to the Ninject Google Group)

    Read the article

  • Extending JavaScript's Date.parse to allow for DD/MM/YYYY (non-US formatted dates)?

    - by Campbeln
    I've come up with this solution to extending JavaScript's Date.parse function to allow for dates formatted in DD/MM/YYYY (rather then the American standard [and default] MM/DD/YYYY): (function() { var fDateParse = Date.parse; Date.parse = function(sDateString) { var a_sLanguage = ['en','en-us'], a_sMatches = null, sCurrentLanguage, dReturn = null, i ; //#### Traverse the a_sLanguages (as reported by the browser) for (i = 0; i < a_sLanguage.length; i++) { //#### Collect the .toLowerCase'd sCurrentLanguage for this loop sCurrentLanguage = (a_sLanguage[i] + '').toLowerCase(); //#### If this is the first English definition if (sCurrentLanguage.indexOf('en') == 0) { //#### If this is a definition for a non-American based English (meaning dates are "DD MM YYYY") if (sCurrentLanguage.indexOf('en-us') == -1 && // en-us = English (United States) + Palau, Micronesia, Philippians sCurrentLanguage.indexOf('en-ca') == -1 && // en-ca = English (Canada) sCurrentLanguage.indexOf('en-bz') == -1 // en-bz = English (Belize) ) { //#### Setup a oRegEx to locate "## ## ####" (allowing for any sort of delimiter except a '\n') then collect the a_sMatches from the passed sDateString var oRegEx = new RegExp("(([0-9]{2}|[0-9]{1})[^0-9]*?([0-9]{2}|[0-9]{1})[^0-9]*?([0-9]{4}))", "i"); a_sMatches = oRegEx.exec(sDateString); } //#### Fall from the loop (as we've found the first English definition) break; } } //#### If we were able to find a_sMatches for a non-American English "DD MM YYYY" formatted date if (a_sMatches != null) { var oRegEx = new RegExp(a_sMatches[0], "i"); //#### .parse the sDateString via the normal Date.parse function, but replacing the "DD?MM?YYYY" with "YYYY/MM/DD" beforehand //#### NOTE: a_sMatches[0]=[Default]; a_sMatches[1]=DD?MM?YYYY; a_sMatches[2]=DD; a_sMatches[3]=MM; a_sMatches[4]=YYYY dReturn = fDateParse(sDateString.replace(oRegEx, a_sMatches[4] + "/" + a_sMatches[3] + "/" + a_sMatches[2])); } //#### Else .parse the sDateString via the normal Date.parse function else { dReturn = fDateParse(sDateString); } //#### return dReturn; } })(); In my actual (dotNet) code, I'm collecting the a_sLanguage array via: a_sLanguage = '<% Response.Write(Request.ServerVariables["HTTP_ACCEPT_LANGUAGE"]); %>'.split(','); Now, I'm not certain my approach to locating "us-en"/etc. is the most proper. Pretty much it's just the US and current/former US influenced areas (Palau, Micronesia, Philippines) + Belize & Canada that use the funky MM/DD/YYYY format (I am American, so I can call it funky =). So one could rightly argue that if the Locale is not "en-us"/etc. first, then DD/MM/YYYY should be used. Thoughts? As a side note... I "grew up" in PERL but it's been a wee while since I've done much heavy lifting in RegEx. Does that expression look right to everyone? This seems like a lot of work, but based on my research this is indeed about the best way to go about enabling DD/MM/YYYY dates within JavaScript. Is there an easier/more betterer way? PS- Upon re-reading this post just before submission... I've realized that this is more of a "can you code review this" rather then a question (or, an answer is embedded within the question). When I started writing this it was not my intention to end up here =)

    Read the article

  • MPMoviePlayerContentPreloadDidFinishNotification does not fire [iPhone]

    - by JOKe
    I'm running into a problem with the MPMoviePlayerContentPreloadDidFinishNotification notification. I've regisered to recieve the MPMoviePlayerContentPreloadDidFinishNotification notification and MPMoviePlayerPlaybackDidFinishNotification but the first one never fires. Is this bug in Firmware OS 3.0 ? maybe fixed in 3.1 ? or ? Because my divice and similator is 3.0 maybe this is a bug ? My code : ... [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(MovieDidLoad:) name:MPMoviePlayerContentPreloadDidFinishNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(MovieDidLoad:) name:MPMoviePlayerPlaybackDidFinishNotification object:nil]; ... -(void)MovieDidLoad:(NSNotification*)notification { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Notification Listener" message:@"Notification Listener invoked" cancelButtonTitle:@"Ok dude!" otherButtonTitles:nil]; [alert show]; [alert release]; } The MPMoviePlayerPlaybackDidFinishNotification is always fired but MPMoviePlayerContentPreloadDidFinishNotification is never fired. Any ideas ?

    Read the article

  • WPF DataGrid - Can't Use Mouse To Scroll Because Of Drag Drop

    - by OrPaz
    Hello, I am using a datagrid that is allowing to drag its rows. My problem is that when i try to scroll down on my grid using the mouse on the side scroller, i get the 'no enterance' sign that means that "drag and drop is not allowed here, dude...". How can i modify my drag and drop function to recognize that this is not a drag and drop action, but a scroll mouse action? private new void MouseMove(object sender, MouseEventArgs e) { if (e.LeftButton == MouseButtonState.Pressed) { Point currentPosition = e.GetPosition(GridUC); Object selectedItem = GridUC.SelectedItem; if (selectedItem == null) return; DragDropContainerObject ddObject = new DragDropContainerObject(typeof(Actor), selectedItem); DataGridRow container = (DataGridRow)GridUC.ItemContainerGenerator.ContainerFromItem(selectedItem); if (container != null) { DragDropEffects finalDropEffect = DragDrop.DoDragDrop(container, ddObject, DragDropEffects.Link); } } }

    Read the article

  • Best way to represent Gender in a class library used in multilingual applications

    - by Hauge
    I'm creating class library with some commonly used classes like persons, addresses etc. This library will be used in an multilingual application, and I am looking for the most convenient way to represent a persons gender. Ideally I would like to be able to code like this: Person person = new Person { Gender = Genders.Male, FirstName = "Nice", LastName = "Dude" } if (person.Gender == Genders.Male) Console.WriteLine("person is Male"); Console.WriteLine(person.Gender); //Should output: Male Console.WriteLine(person.Gender.ToString("da-DK")); //Should output the name of the gender in the language provided List<Gender> genders = Genders.GetAll(); foreach(Gender gender in genders) { Console.WriteLine(gender.ToString()); Console.WriteLine(gender.ToString("da-DK")); } What would you do? An enumeration and a specialized Gender class, but what about the localization then? Regards Jesper Hauge

    Read the article

  • How to stop NpgsqlDataReader from blocking?

    - by Swingline Rage
    Running the following code against a large PostgreSQL table, the NpgsqlDataReader object blocks until all data is fetched. NpgsqlCommand cmd = new NpgsqlCommand(strQuery, _conn); NpgsqlDataReader reader = cmd.ExecuteReader(); // <-- takes 30 seconds How can I get it to behave such that it doesn't prefetch all the data? I want to step through the resultset row by row without having it fetch all 15 GB into memory at once. I know there were issues with this sort of thing in Npgsql 1.x but I'm on 2.0. This is against a PostgreSQL 8.3 database on XP/Vista/7. I also don't have any funky "force Npgsql to prefetch" stuff in my connection string. I'm at a complete loss for why this is happening.

    Read the article

  • Setting a cell's format using Excel 2007 Interop and C#

    - by CVertex
    I'm using the office 2007 interop assemblies to create some excel spreadsheets. There are plenty of questions on here about getting started and MSDN contains heaps of articles, like this one. The API is funky, and sometimes a bit confusing. When I set a value of a cell, is there a way to set it's format? I'd like to mark particular fields as Date's so my customer can run excel macros on them. Also, numbers would be useful. Thanks!

    Read the article

  • Flash AS3 and XML: way to fix line breaks in htmlText that uses <b> tags in the xml?

    - by HeroicNate
    I'm importing text in from an xml file and i'm using htmlText to try to keep some styling with tags. I have both the regular and bold face font embedded, and the bolding works fine. The problem is that it ads spaces around the words in bold like a paragraph indent and then makes a line-break after them. What's going on, is there a way to fix? fromxmlText.htmlText = theXML.contenttext; If I pull the text in from a txt file it will work fine, but taking it out of an xml file causing funky formatting. lil' help?

    Read the article

  • Log4cxx sample program and steps to compile

    - by Jake
    Hi guys Hoping someone can help out.. I've been scouring the net for a simple how-to to get a good log4cxx program working, with steps on setting up the libraries, dependants, directives, library paths etc etc.. as of yet i've found a lot of valuable but disjointed information.. trying to pull it all together has been a bit of a nightmare, so i'm reaching out and wondering if any kind soul knows of, or could put together a simple how-to, to get a standard win32 console app running with either static or dynamically linked release mode log4cxx.. I have win32 binary releases of the libraries, and thanks to a very cool dude from "Must a blog have a name" I have a win32 project which can build log4cxx.. i just cant bloody use it :) It would be really helpful to me, and probably to others, to be able to refer to something like this and not 20 different pages, with different lists of libraries needed to download and install.. :) Here's hoping Thanks guys J

    Read the article

  • How to prevent a modal UIImagePickerController from rotating?

    - by coneybeare
    I have an app that fully support rotation. I am modally adding a UIImagePickerController for which there is no support for UIInterfaceOrientationLandscape and I cannot get the controller to stay in portrait. In other words, I need to disable rotation for the UIImagePickerController so it stays in portrait, without removing rotation for the rest of my app. this seems basic, but I can't seem to locate it. How can I prevent this rotation? UPDATE As suggested, I tried subclassing with the following code: @interface UAImagePickerController : UIImagePickerController { } @end @implementation UAImagePickerController - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { return UIDeviceOrientationIsPortrait(toInterfaceOrientation); } @end The line is not being hit at all with a breakpoint… i think there must be something funky about the UIImagePickerView

    Read the article

  • Generating Component SEF URLs in Joomla

    - by Jarrod
    I have a custom Joomla component and a router for building my SEF URL's for use within the site, and everything is usually shiny - internally, all of my links look and act fantastic. I recently route a controller action that sends a list of links through email, and I've noticed that my URLs are coming out.... funky - hopefully someone can tell me why. Usually, my router generates an internal link that looks like this: http://localhost/Registry/calendar/265889635/Some-Long-Boring-Event However, when I send an email and preparing the same URL through the same router I get: http://localhost/Registry/Registry/component/calendar/569555803/Some-Long-Boring-Event Has anybody run into this issue before?

    Read the article

  • How to prevent direct access to my JSON service?

    - by FrankLy
    I have a JSON web service to return home markers to be displayed on my Google Map. Essentially, http://example.com calls the web service to find out the location of all map markers to display like so: http://example.com/json/?zipcode=12345 And it returns a JSON string such as: {"address": "321 Main St, Mountain View, CA, USA", ...} So on my index.html page, I take that JSON string and place the map markers. However, what I don't want to have happen is people calling out to my JSON web service directly. I only want http://example.com/index.html to be able to call my http://example.com/json/ web service ... and not some random dude calling the /json/ directly. Quesiton: how do I prevent direct calling/access to my http://example.com/json/ web service?

    Read the article

  • Force redraw as resizing NSTableColumn in NSTableView?

    - by Dov
    I've implemented - (CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row in my NSTableView's delegate to resize the height of my table's rows as the width of the leftmost column changes. The problem is that only that column redraws during the resizing (and any column that slide into view during the resize). This results in the funky visual below after resizing. What I'd like is a way to tell the table view to completely redraw while the user is resizing a column. Right now the most I've been able to figure out is calling setNeedsDisplay after it that column finishes resizing.

    Read the article

  • Android - Having a service run every day at 4AM

    - by Bara
    Hello everyone, I would like to know the best practices for running a Service every day at 4AM. The way I think I should be doing it is to create a new repeating alarm using AlarmManager and having it run the service at 4AM. Problem is, I'm not sure where to put the code to set the alarm. Do I do it in my main activity as one of the first tasks in the OnCreate method? Do I do some funky stuff with BroadcastReceivers and intents? What happens when a user updates my app? What happens when a user restarts? Any help with these questions would be much appreciated :) Sample code would be helpful as well! Bara

    Read the article

  • Strange padding in Safari when using SVG images

    - by Naman Goel
    I thought I was having issues with margins but then on a closer look I found that SVGs are acting funky in Safari 6. I am building a simple Hexagon based website. Of course I used negative vertical margins to for a little overlap to 'inter-lock' the hexagons. And to save space I was using SVG images for the hexagons. It works great in chrome and firefox, but in Safari, there is a strange padding in the SVG images. I'm using simple img tags for the svg images. Everything works when I switch to PNG, but I'd prefer to stick to SVGs. Any insight? Can I perhaps delve into the SVG code and somehow fix the SVG problem in Safari? or is it some sort of bug, that I can do nothing about without browser sniffing?

    Read the article

  • Python doesn't work properly when I execute a script after using Right Click >> Command Prompt Here

    - by Dominic Bou-Samra
    This is a weird bug. I know it's something funky going on with my PATH variable, but no idea how to fix it. If I have a script C:\Test\test.py and I execute it from within IDLE, it works fine. If I open up Command Prompt using Runcmd.exe and navigate manually it works fine. But if I use Windows 7's convenient Right Click on folder Command Prompt Here then type test.py it fails with import errors. I also cannot just type "python" to reach a python shell session if I use the latter method above. Any ideas?

    Read the article

  • Debugging F# code and functional style

    - by Roger Alsing
    I'm new to funcctional programming and have some questions regarding coding style and debugging. I'm under the impression that one should avoid storing results from funcction calls in a temp variable and then return that variable e.g. let someFunc foo = let result = match foo with | x -> ... | y -> ... result And instead do it like this (I might be way off?): let someFunc foo = match foo with | x -> ... | y -> ... Which works fine from a functionallity perspective, but it makes it way harder to debug. I have no way to examine the result if the right hand side of - does some funky stuff. So how should I deal with this kind of scenarios?

    Read the article

  • Invoices for Printing in MS-Access

    - by Nitrodist
    The application that I'm currently working on has a funky set up for the invoices that they print. The form is the invoice that is printed out. I took a look at the Northwind DB and what it does is and it actually generates a report based on the record's information. What are the limitations of using Forms vs. Reports for printing out reports? One of the limitations that I've run into so far is that the printed page is jam packed with information (all required) to fit on a single page, yet there is lots of wasted space for some stuff since elements on the page don't shrink or grow due to what's inputted into the textboxes. How are invoices designed for your applications? How do you handle space restraints for creating invoices?

    Read the article

  • Problems with .net and toolbar, menu & status bar rendermode (blue) and standard form (grey)

    - by Andrew White
    Hiya, I'm a bit of a newbie to .NET so please ignore my ignorance. If you look at the above image (a complete prototype, ignore black bits :)) you will see lovely menus, toolbars & statusbars all using windows XP render mode and in a funky blue. Look at the form, labels, checkboxes and other buttons and you see horrible old school windows grey. These components don't have a render mode. My question: is there any way to show everything in XP style or do I have to chose new components? Thx. A.

    Read the article

  • passing array of structs from c# to regular dll

    - by buzz
    Hi there I have a regular dll with the followign fucntion exported. extern "C" __declspec(dllexport) int FindNearestStuff(double _latitude, double _longitude , LocationStruct * locations[]) LocationStruct is very simple struct LocationStruct { long positionIndex; long item; }; I'm tryign to call it from c# using [DllImport("myclever.dll", CharSet = CharSet.None)] private static extern int FindNearestStuff(double _latitude, double _longitude, ref LocationStruct [] locations); Its all cool and funky and i can step into the dll function from the debugger. Inside the dll the LocationStruct array is populated correctly and all is very good. the problem i have is when it returns back from the dll, the LocationStruct array is not coming back with the data - just empty values... what am i missing? cheers Buzz

    Read the article

  • Xcode: How-to bind a key that triggers application to appear (background daemon)

    - by Shyam
    Hi, I am struggling to create a certain kind of application my Mac, using Xcode and Interface Builder (RubyCocoa). As I am a nuby (but understand some Ruby), I would like to know how I could let my interface appear only if a key is pushed (a toggle), while the program is running in the background. Similar behavior like when I'd press the F4-key to show Dashboard. Really neat would be if the program wouldn't be showing as running in the Dock, but as a funky icon in the top bar, like well "Growl". Thank you so much for your help, comments and feedback!

    Read the article

  • How to preserve object identity across different VMs

    - by wheleph
    To be specific let me illustrate the question with Spring http-remoting example. Suppose we have such implementation of a simple interface: public SearchServiceImpl implements SearchService { public SearchJdo processSearch(SearchJdo search) { search.name = "a funky name"; return search; } } SearchJdo is itself a simple POJO. Now when we call the method from a client through http-remoting we'll get: public class HTTPClient { public static void main(final String[] arguments) { final ApplicationContext context = new ClassPathXmlApplicationContext( "spring-http-client-config.xml"); final SearchService searchService = (SearchService) context.getBean("searchService"); SearchJdo search = new SearchJdo(); search.name = "myName"; // this method actually returns the same object it gets as an argument SearchJdo search2 = searchService.processSearch(search); System.out.println(search == search2); // prints "false" } } The problem is that the search objects are different because of serializaton although from logical prospective they are the same. The question is whether there are some technique that allows to support or emulate object identity across VMs.

    Read the article

  • SetParent() on a VB6 application from a C# app

    - by JD
    Aloha all! I am trying to use the win32 API to set the parent of an application to a panel in my C# application. I can get most applications to work... However I have one application which was written in VB6 which I am having problems with... When I inspect it using spy++ the application loads in 2 main forms 'ThunderRT6Main' and 'ThunderRT6MDIForm' both with the same title. I have found the handle of both of these and tried to call SetParent on them both but the window does nothing and does not move anywhere... Is there something funky I need to do when invoking SetParent() on a VB6 app?

    Read the article

  • How to deserialize from json to ActiveRecord objects with associations?

    - by Carmine Paolino
    In my Rails application there is a model that has some has_one associations (this is a fabricated example): class Person::Admin < ActiveRecord::Base has_one :person_monthly_revenue has_one :dude_monthly_niceness accepts_nested_attributes_for :person_monthly_revenue, :dude_monthly_niceness end class Person::MonthlyRevenue < ActiveRecord::Base belongs_to :person_admin end class Dude::MonthlyNiceness < ActiveRecord::Base belongs_to :person_admin end The application talks to a backend that computes some data and returns a piece of JSON like this: { "dude_monthly_niceness": { "february": 1.1153232569518972, "october": 1.1250217200558268, "march": 1.3965786869658541, "august": 1.6293418014601631, "september": 1.4062771500697835, "may": 1.7166279693955291, "january": 1.0086401628086725, "june": 1.5711510228365859, "april": 1.5614525597326563, "december": 0.99894169970474289, "july": 1.7263264324994585, "november": 0.95044938418509506 }, "person_monthly_revenue": { "february": 10.585596551505297, "october": 10.574823016656749, "march": 9.9125274764852787, "august": 9.2111604702328922, "september": 9.7905249446675153, "may": 9.1329712474607962, "january": 10.479614016604238, "june": 9.3710235926961936, "april": 9.5897372624830304, "december": 10.052587677671438, "july": 8.9508877843925561, "november": 10.925339756096172 }, } To deserialize it, I use ActiveRecord's from_json, but instead of a Person::Admin object with all the associations in place, I get this error: >> Person::Admin.new.from_json(json) NameError: uninitialized constant Person::Admin::DudeMonthlyNiceness Am I doing something wrong? Is there a better way to deserialize data? (I can modify the backend easily)

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13  | Next Page >