Daily Archives

Articles indexed Monday June 27 2011

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

  • Not loading the object caused EF4 (code first) to remove the relationship

    - by Lavinski
    Firstly this is a EF4: Code First - Property Loading question. I'm loading an object like so var item = Context.Table.Find( update.Identifier ); This object has a property Relationship so a table has a Relationship object. Now i'm updating my item but my Relationship object is not toched (and therefore not lazy loaded). Now here's the problem .. I save my item and my relationship to the Relationship object is deleted, apparently the model thinks i set it to null. However it all works if I look at the property before saving. So I'm looking into LoadProperty or doing a query and using Include. Has anyone else come across this issue and how did you get around it?

    Read the article

  • increasing amazon root volume size

    - by OCD
    I have a default amazon ec2 instance with 8GB root volume size. I am running out of space. I have: Detach the current EBS volume in AWS Management Console (Web). Create snapshot of this volume. Created a new Volume with 50G space with my snapshot. Attach the new volume back to the instance to /dev/sda1 However, when I reconnect to the account with: > df -h I can see from the management console that my new Filesystem 1K-blocks Used Available Use% Mounted on /dev/xvda1 8256952 8173624 0 100% / tmpfs 308508 40 308468 1% /dev/shm It's still not using my new volume's size, how to make this work?

    Read the article

  • Extract multiple values from one column in MySql

    - by Neil
    I've noticed that MySql has an extensive search capacity, allowing both wildcards and regular expressions. However, I'm in somewhat in a bind since I'm trying to extract multiple values from a single string in my select query. For example, if I had the text "<span>Test</span> this <span>query</span>", perhaps using regular expressions I could find and extract values "Test" or "query", but in my case, I have potentially n such strings to extract. And since I can't define n columns in my select statement, that means I'm stuck. Is there anyway I could have a list of values (ideally separated by commas) of any text contained with span tags? In other words, if I ran this query, I would get "Test,query" as the value of spanlist: select <insert logic here> as spanlist from HtmlPages ...

    Read the article

  • Dependecy Injection with Massive ORM: dynamic trouble

    - by Sergi Papaseit
    I've started working on an MVC 3 project that needs data from an enormous existing database. My first idea was to go ahead and use EF 4.1 and create a bunch of POCO's to represent the tables I need, but I'm starting to think the mapping will get overly complicated as I only need some of the columns in some of the tables. (thanks to Steven for the clarification in the comments. So I thought I'd give Massive ORM a try. I normally use a Unit of Work implementation so I can keep everything nicely decoupled and can use Dependency Injection. This is part of what I have for Massive: public interface ISession { DynamicModel CreateTable<T>() where T : DynamicModel, new(); dynamic Single<T>(string where, params object[] args) where T : DynamicModel, new(); dynamic Single<T>(object key, string columns = "*") where T : DynamicModel, new(); // Some more methods supported by Massive here } And here's my implementation of the above interface: public class MassiveSession : ISession { public DynamicModel CreateTable<T>() where T : DynamicModel, new() { return new T(); } public dynamic Single<T>(string where, params object[] args) where T: DynamicModel, new() { var table = CreateTable<T>(); return table.Single(where, args); } public dynamic Single<T>(object key, string columns = "*") where T: DynamicModel, new() { var table = CreateTable<T>(); return table.Single(key, columns); } } The problem comes with the First(), Last() and FindBy() methods. Massive is based around a dynamic object called DynamicModel and doesn't define any of the above method; it handles them through a TryInvokeMethod() implementation overriden from DynamicObject instead: public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result) { } I'm at a loss on how to "interface" those methods in my ISession. How could my ISession provide support for First(), Last() and FindBy()? Put it another way, how can I use all of Massive's capabilities and still be able to decouple my classes from data access?

    Read the article

  • How to detect touch over a UIView when touched over a UIButton?

    - by jglievano
    I'm using (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event, and (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event to handle some dragging on a UIView. This UIView however have some UIButtons as subviews of the UIView and when the user touches over a UIButton (which are also over the UIView) the touches methods aren't called. I need the touch methods in the UIView to be called at all times and still have the UIButtons working, how can I achieve this?

    Read the article

  • Browser Compatablitiy, Support, Modern Browsers and older Versions.

    - by smoop
    This is a question to all web-developers working in the industry more than a few years. Today the server guy at my work told me that his browser didnt render a google font I used on a site properly, so I checked his browser - it was firefox 3.5. (google font Raleway).. This made me think.. I know for some of our sites its a requirement to support IE6 (larger corperate sites) but for the rest (personal sites) should I be looking at developing for all incrments of firefox, chrome, IE and safari???? Does your company still support IE6? Does your company support previous versions of modern browsers or just the latest ones? and finally, has anyone else had this problem with FF 3.5 and Google Hosted font Raleway..(the font displays extra extra thing so the font is almost unreadable) If anyones interested I found a working solution to my font problem here: http://www.jshsolutions.net/google-webfonts-cross-browser-fix-howto/ Sam

    Read the article

  • Storage for large gridded datasets

    - by nullglob
    I am looking for a good storage format for large, gridded datasets. The application is meteorology, and we would prefer a format that is common within this field (to help exchange data with others). I don't need to deal with special data structures, and there should be a Fortran API. I am currently considering HDF5, GRIB2 and NetCDF4. How do these formats compare in terms of data compression? What are their main limitations? How steep is the learning curve? Are there any other storage formats worth investigating? I have not found a great deal of material outlining the differences and pros/cons of these formats (there is one relevant SO thread, and a presentation comparing GRIB and NetCDF).

    Read the article

  • How can I get the user object from a service in Symfony2

    - by pogo
    My site is using a third party service for authentication as well as other bits of functionality so I have setup a service that does all the API calls for me and it's this service that I need to be able to access the user object. I've tried injecting the security.context service into my API service but I get a ServiceCircularReferenceException because my user authentication provider references the API service (it has to in order to authenticate the user). So I get a chain of security.context -> authentication provider -> user provider -> API service -> security.context I'm struggling to this of another way of getting the user object and I can't see any obvious way of splitting up this chain. My configs are all defined in config.yml, here are the relevant bits myapp.database: class: Pogo\MyAppBundle\Service\DatabaseService arguments: siteid: %siteid% entityManager: "@doctrine.orm.entity_manager" myapp.apiservice: class: Pogo\MyAppBundle\Service\TicketingService arguments: entityManager: "@myapp.database" myapp.user_provider: class: Pogo\MyAppBundle\Service\APIUserProvider arguments: entityManager: "@myapp.database" ticketingAdapter: "@myapp.apiservice" securityContext: "@security.context" myapp.authenticationprovider: class: Pogo\MyAppBundle\Service\APIAuthenticationProvider arguments: userChecker: "@security.user_checker" encoderFactory: "@security.encoder_factory" userProvider: "@myapp.user_provider" myapp.user_provider is the service that I've defined as my user provider service in security.yml which I presume is how it's being referenced by security.context

    Read the article

  • stop android emulator call

    - by Shahzad Younis
    I am working on an Android application, having functionality like voicemail. I am using BroadcastReceiver to get dialing events. I have to get the event "WHEN CALL IS UNANSWERED (not picked after few rings) FROM RECEIVER". I will do some actions on caller end against this event. I am using AVD emulator, and I do call from one instance to another instance and it calls perfectly, but the problem is: It continuously calls until I reject or accept the call. This way I cannot detect that "CALL IS UNANSWERED AFTER A NUMBER OF RINGS". So I want the Caller emulator to drop the call after a number of rings (if unanswered) like a normal phone. I can do it (drop the call after some time) by writing some code, but I need the natural functionality of phone in the emulator. Can anyone please guide me? Is there any settings in the emulator? Or something else? The code is shown below in case it helps: public class MyPhoneReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Bundle extras = intent.getExtras(); if (extras != null) { String state = "my call state = " + extras.getString(TelephonyManager.EXTRA_STATE); Log.w("DEBUG", state); } }

    Read the article

  • Code refactoring c# question around several if statements performing the same check

    - by James Radford
    I have a method that has a load of if statements that seems a bit silly although I'm not sure how to improve the code. Here's an example. This logic was inside the view which is now in the controller which is far better but is there something I'm missing, maybe a design pattern that stops me having to check against panelCount < NumberOfPanelsToShow and handling the panelCount every condition? Maybe not, just feels ugly! Many thanks if (model.Train && panelCount < NumberOfPanelsToShow) { panelTypeList.Add(TheType.Train); panelCount++; } if (model.Car && panelCount < NumberOfPanelsToShow) { panelTypeList.Add(TheType.Car); panelCount++; } if (model.Hotel && panelCount < NumberOfPanelsToShow) { panelTypeList.Add(TheType.Hotel); panelCount++; } ...

    Read the article

  • Sproutcore SC.arrayProxy, where is in the docs?

    - by Bakaburg
    I'm reading the getting started guide of sproutcore, about the Todo app. Around the beginning they tell to instantiate a controller from the SC.arrayProxy class. But this class is not present in the docs!!! and even in google is nowhere to be found! where does it come out from?? EDIT: I discovered that SC.arrayProxy is only in sproutcore 2! I wonder what are the differences from SC.arrayController

    Read the article

  • WPF texbox focus when render to offscreen buffer

    - by dr.mo
    i am rendering a textbox to an offscreen buffer using RenderTargetBitmap and i want to enter text into this textbox, however, i can't set the textbox focus (using Focus() has no effect - presumably because the canvas is not attached to a real window?) this has two consequenes: 1 the keyboard input doesn't get captured 2. even if i set the text manually using TextBox text and CaretIndex = index i dont get a caret because of the lack of focus. is there a way to make this focus somehow? and if not, i'd like to at least have the caret visible even if there is no focus, but can't see a way of doing this.

    Read the article

  • Break a string into parts, returning all characters

    - by Benjamin
    I want to break a string according to the following rules: all consecutive alpha-numeric chars, plus the dot (.) must be treated as one part all other consecutive chars must be treated as one part consecutive combinations of 1 and 2 must be treated as different parts no whitespace must be returned For example this string: Method(hierarchy.of.properties) = ? Should return this array: Array ( [0] => Method [1] => ( [2] => hierarchy.of.properties [3] => ) [4] => = [5] => ? ) I was unsuccessful with preg_split(), as AFAIK it cannot treat the pattern as an element to be returned. Any idea for a simple way to do this?

    Read the article

  • Hadoop reduce task gets hung

    - by user806098
    I set up a hadoop cluster with 4 nodes, When running a map-reduce task, the map task finishes quickly, while the reduce task hangs at 27% percent. I checked the log, it's that the reduce task fails to fetch map output from map nodes. The job tracker log of master shows messages like this: 2011-06-27 19:55:14,748 INFO org.apache.hadoop.mapred.JobTracker: Adding task (REDUCE) 'attempt_201106271953_0001_r_000000_0' to tip task_201106271953_0001_r_000000, for tracker 'tracker_web30.bbn.com.cn:localhost/127.0.0.1:56476' And the name node log of master shows messages like this: 2011-06-27 14:00:52,898 INFO org.apache.hadoop.ipc.Server: IPC Server handler 4 on 54310, call register(DatanodeRegistration(202.106.199.39:50010, storageID=DS-1989397900-202.106.199.39-50010-1308723051262, infoPort=50075, ipcPort=50020)) from 192.168.225.19:16129: error: java.io.IOException: verifyNodeRegistration: unknown datanode 202.106.199.3 9:50010 However, neither the "web30.bbn.com.cn" or 202.106.199.39, 202.106.199.3 is the slave node. I think such ip/domains appear because hadoop fails to resolve a node(first in the Intranet DNS server), then it goes to a higher-level DNS server, later to the top, still fails, then the "junk" ip/domains are returned. But I checked my config, it goes like this: /etc/hosts: 127.0.0.1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 192.168.225.16 master 192.168.225.66 slave1 192.168.225.20 slave5 192.168.225.17 slave17 conf/core-site.xml: hadoop.tmp.dir /root/hadoop_tmp/hadoop_${user.name} fs.default.name hdfs://master:54310 io.sort.mb 1024 hdfs-site.xml: dfs.replication 3 masters: master slaves: master slave1 slave5 slave17 Also, all firewalls(iptables) are turned off, and ssh between each 2 nodes is ok. so I don't know where exact the error comes from. Please help. Thanks a lot.

    Read the article

  • Google I/O Sandbox Case Study: Doubletwist

    Google I/O Sandbox Case Study: Doubletwist We interviewed DoubleTwist at the Google I/O Sandbox on May 11, 2011. They explained to us the benefits of building their DoubleTap application on the Android Platform. DoubleTwist AirSync let's you wirelessly sync your music collection across all your devices. Their new app, DoubleTap, let's you share music between phones by simply tapping the phones together. For more information about developing on Android, visit: developer.android.com For more information on DoubleTwist, visit: www.doubletwist.com From: GoogleDevelopers Views: 13 0 ratings Time: 01:42 More in Science & Technology

    Read the article

  • Google I/O Sandbox Case Study: VectorUnit

    Google I/O Sandbox Case Study: VectorUnit We interviewed VectorUnit at the Google I/O Sandbox on May 11, 2011 and they explained to us the benefits of building for the Android Platform. VectorUnit creates console-quality video games for the Android. For more information on Android developers, visit: developers.android.com For more information on VectorUnit, visit vectorunit.com From: GoogleDevelopers Views: 13 0 ratings Time: 01:33 More in Science & Technology

    Read the article

  • Google I/O Sandbox Case Study: MOVL

    Google I/O Sandbox Case Study: MOVL We interviewed MOVL at the Google I/O Sandbox on May 10, 2011 and they explained to us the benefits of developing on the Google TV Platform. MOVL develops gaming applications that people can play on their Google TV's, using their mobile phones as the controllers. For more information on developing on Google TV, visit: code.google.com For more information on MOVL, visit: movl.com From: GoogleDevelopers Views: 19 0 ratings Time: 02:03 More in Science & Technology

    Read the article

  • Google I/O Sandbox Case Study: MobileASL

    Google I/O Sandbox Case Study: MobileASL We interviewed MobileASL at the Google I/O Sandbox on May 11, 2011 and they explained to us the benefits of developing their accessibility applications on the Android platform. MobileASL is a video compression project that aims to make sign language communication on mobile phones a reality. For more information on Accessibility Developers, visit: google.com For more information on MobileASL, visit: mobileasl.cs.washington.edu From: GoogleDevelopers Views: 14 0 ratings Time: 01:57 More in Science & Technology

    Read the article

  • Google I/O Sandbox Case Study: Eureka Streams

    Google I/O Sandbox Case Study: Eureka Streams We interviewed Lockheed Martin at the Google I/O Sandbox on May 10, 2011 and they demoed their product, Eureka Streams, and explained to us the benefits of using web toolkit to build it. Eureka Streams is a social communication platform built to help individuals in large corporations communicate with each other. For more information on Google Web Toolkit, visit: code.google.com For more information on Eureka Streams, visit: www.eurekastreams.org From: GoogleDevelopers Views: 29 0 ratings Time: 02:35 More in Science & Technology

    Read the article

  • Google I/O Sandbox Case Study: HistoryPin

    Google I/O Sandbox Case Study: HistoryPin We interviewed HistoryPin at the Google I/O Sandbox on May 10, 2011 and they explained to their new technology and the benefits of integrating with Google Maps. HistoryPin lets you upload historical photos of places onto their respective points on Google Maps, enabling users to see what cities looked like at different points in time. For more information about developing on Google Maps visit: code.google.com For more information on HistoryPin, visit: www.historypin.com From: GoogleDevelopers Views: 90 0 ratings Time: 01:28 More in Science & Technology

    Read the article

  • Google I/O Sandbox Case Study: GoAnimate

    Google I/O Sandbox Case Study: GoAnimate We interviewed GoAnimate at the Google I/O Sandbox on May 10, 2011 and they explained to us the benefits of using partnering with YouTube. GoAnimate is an video creation platform that lets users easily create animated videos and publish them on YouTube. For more information on developing on YouTube, visit: code.google.com For more information on GoAnimate, visit: goanimate.com From: GoogleDevelopers Views: 33 0 ratings Time: 02:17 More in Science & Technology

    Read the article

  • Google I/O Sandbox Case Study: DayZipping

    Google I/O Sandbox Case Study: DayZipping We interviewed DayZipping at the Google I/O Sandbox on May 10, 2011. They explained to us the benefits of integrating with Google Maps. DayZipping is a website where users can find and share day trips for a variety of popular destinations. For more information about developing on Google Maps, visit: code.google.com For more information on DayZipping, visit: www.dayzipping.com From: GoogleDevelopers Views: 33 0 ratings Time: 02:09 More in Science & Technology

    Read the article

  • Google I/O Sandbox Case Study: CNBC

    Google I/O Sandbox Case Study: CNBC We interviewed CNBC at the Google I/O Sandbox on May 11, 2011. They explained to us the benefits of building apps for the Google TV platform. CNBC's Real-Time Finance App is now available on Google TV, in addition to Android. Now consumers can access the same real-time stock information about the companies they are interested in from their living room. For more information about developing on Google TV, visit: code.google.com For more information on CNBC, visit: www.cnbc.com From: GoogleDevelopers Views: 22 0 ratings Time: 02:06 More in Science & Technology

    Read the article

  • Google I/O Sandbox Case Study: CloudSherpas

    Google I/O Sandbox Case Study: CloudSherpas We interviewed CloudSherpas at the Google I/O Sandbox on May 10, 2011. They explained to us the benefits of integrating with Google Apps. CloudSherpas helps companies migrate to Google Apps and offers SherpaTools as an additional contact management solution for companies' administrators. For more information about developing with Google Apps, visit: code.google.com For more information on CloudSherpas, visit: www.cloudsherpas.com From: GoogleDevelopers Views: 406 13 ratings Time: 02:29 More in Science & Technology

    Read the article

  • Google I/O Sandbox Case Study: CardinalCommerce

    Google I/O Sandbox Case Study: CardinalCommerce We interviewed CardinalCommerce at the Google I/O Sandbox on May 10, 2011. They explained to us the benefits of integrating with Google Checkout. CardinalCommerce enables authenticated payments and alternative payment brands and is working with Google to create Google Mobile Wallet. For more information about developing with Google Commerce, visit: code.google.com For more information on CardinalCommerce, visit: www.cardinalcommerce.com From: GoogleDevelopers Views: 611 16 ratings Time: 02:19 More in Science & Technology

    Read the article

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