Search Results

Search found 2417 results on 97 pages for 'states'.

Page 58/97 | < Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >

  • Automapping to EntityKeys in Entity Framework

    - by CodeGrue
    Does anyone have a technique to automap (using Automapper) references to child entities. So say I have a ViewModel: class AddressModel { int Id; string Street; StateModel State; } class StateModel { int Id; string Name; } And I pass this into a repository to map to equivalent entities in Entity Framework. When Automapping, I want it to automap AddressModel.State.ID to the EntityKey of AddressEntity.StateReference. So hand crafted code would look like this: addressEntity.Id = AddressModel.Id; addressEntity.Street = AddressModel.Street addressEntity.StateReference.EntityKey = new EntityKey("MyDB.States", "Id", AddressModel.State.Id); Obviously, when automapper tries to assign an Address.State.Id to the equivalent in EF, an exception is thrown.

    Read the article

  • Git pull error: unable to create temporary sha1 filename

    - by gnus.es
    Hi everyone, I've got a small git repo setup with the only real purpose to be able to develop locally on several machines (work, home, laptop). Thus I have one branch and I commit/push once I leave a computer, pull once I sit down at the next. Has worked fine, up to now that is. Now when I pull on my 'live test' machine, I get the following: remote: Counting objects: 38, done. remote: Compressiremote: ng objects: 100% (20/20), done. remote: Total 20 (delta 17), reused 0 (delta 0) error: unable to create temporary sha1 filename .git/objects/ed: File exists fatal: failed to write object fatal: unpack-objects failed Searching around the net the only real answer I could find was the following: http://marc.info/?l=git&m=122720741928774&w=2 which basically states that this is a bogus error that's on top of the pile and thus says nothing about what really is wrong. Where do I go from here to find out what is wrong? Edit: Removed the local copy and re-cloned

    Read the article

  • Eclipse debugging "source not found"

    - by James
    I just started using Eclipse so go easy on me ;). But when trying to debug a JUnit test case I get a dialog that states the the source is not found when I get to this line in the code in my test method: Assert.assertEquals(1, contents.size()); I know I should probably go and try and download the source from somewhere, but I really don't want to because I have no interest in stepping into the JUnit code. I have the JUnit runtime jar so Why does Eclipse expect me to have all the referenced tools source code in order to debug my own code (seems somewhat silly)? My main question is though, how can I tell Eclipse to skip this dialog when the source is not available and allow me to continue to debug my own code? [Edit] I've isolated the cause of this. It seems that Eclipse seems to think it needs the source when an exception is thrown by the internal JUnit code. In general is there anyway to tell it that it doesn't and just have it throw up an error dialog of some kind instead?

    Read the article

  • iPhone StoreKit development: Can't create a test user?

    - by Cruinh
    I'm trying to get up to speed on how to develop an in-app store using the new 3.0 SDK... but I'm a bit stuck in that I don't seem to be able to create a test account. The iTunes Connect FAQ states "To create test users for your sandbox environment, go to the Manage Users section of iTunes Connect and select In App Purchase Test User. Your test users will not have iTunes Connect access. They will just have access to the sandbox environment." ...but when I go to that Manage Users section, there's no mention of any sort of "In App Purschase Test User" or how to make one. Did I miss doing something to enable that? There is another section of that same FAQ that seems to suggest I need to have a paid app in the store first? Is that the reason I can't even use the test environment?

    Read the article

  • How can I organize many results in a selectbox using php?

    - by zeckdude
    I have a select box that is part of a form. It is currently querying the addresses table and displaying the addresses into the select box. I plan on having up to 100 addresses. I'm looking for a solution where I can show all the states if the user clicks on the select box. Then if the user hovers over a state it will show all the addresses for that specific state. Then if the user clicks on an address, it will show that as the picked option in the select box. This is like a dropdown menu within a select box. Does anyone know where I can find a solution as this?

    Read the article

  • Get the selected value from a Select box and check that value against an array in the same form

    - by Rob Allen
    I'm new to JSTL/EL and JSP and can't seem to find a reference which covers the following scenario: I have an array of values in JavaScipt: var Countries = ('US', 'CA'); I then need to check to see if the currently selected value of a standard HTML select box is in that array. This is what I have so far: <select id="shippingCountry"> <option value="AT">Austria</option> <option value="CA">Canada</option> <option value="DE">Germany</option> //... <option value="US">United States</option> </select> <c:choose> <c:when test=" "> // I don't know what to put in the 'test' case <span class="required">*</span> </c:when> </c:choose>

    Read the article

  • Clear Select options when selecting one field while using multiple forms on same page

    - by Nizam
    Hi all, I have a situation where the second select list option is generated from the first select list selected option. Like when we select Country corresponding states are generated in next select list. In my case I am having multiple forms on single page which are same. Can anyone let me know how to implement it on multiple forms. I tried the following code but it didn't work $(".country").change(function(){ $.get("sample.php?val=" + $(this).val(), function(data){ $(this).parent().next().children('.state').children('option').remove(); $(this).parent().next().children('.state').append(data); }); Waiting for your support thanks in advance

    Read the article

  • Trouble getting height of OverlayItem Drawable

    - by Bloudermilk
    Hey- I'm having some trouble getting a hold of the drawable a certain OverlayItem is using so I can calculate the height of it and properly offset the note that shows onTap. Here is my code to try to get that drawable: Drawable marker = item.getMarker(android.R.attr.state_focused); if (marker != null) int markerHeight = marker.getIntrinsicHeight(); marker ends up null. I'm using a drawable XML file with a selector for the different states of the OverlayItem's drawable. In it I'm specifying a drawable for the null state, state_focused, and state_pressed. Thanks for any help! -Nick

    Read the article

  • Why does MySQL autoincrement increase on failed inserts?

    - by Sorcy
    A co-worker just made me aware of a very strange MySQL behavior. Assuming you have a table with an auto_increment field and another field that is set to unique (e.g. a username-field). When trying to insert a row with a username thats already in the table the insert fails, as expected. Yet the auto_increment value is increased as can be seen when you insert a valid new entry after several failed attempts. For example, when our last entry looks like this... ID: 10 Username: myname ...and we try five new entries with the same username value on our next insert we will have created a new row like so: ID: 16 Username: mynewname While this is not a big problem in itself it seems like a very silly attack vector to kill a table by flooding it with failed insert requests, as the MySQL Reference Manual states: "The behavior of the auto-increment mechanism is not defined if [...] the value becomes bigger than the maximum integer that can be stored in the specified integer type." Is this expected behavior?

    Read the article

  • AJAX CascadingDropdown - Setting the selected index

    - by RPM1984
    I have a CascadingDropDown on an ASP.NET page. Now, the prompt text is "Select State". (list of states). However, on a different version of this page (ie querystring), i might want to set the selected index to "California" for example. How can i do this? The web service used by the ajax control (ie GetStates) gets invoked at the same time the jquery document.ready function is triggered (ie asynchronously). So when i try and set the selected index in jquery, the items are not yet bound. Is there a way to attach a handler to the ajax dropdown so that i can set the selected index once the webservice call has completed, and the items are bound?

    Read the article

  • Gruber URL Regex tweak to capture "domain.com"

    - by mootymoots
    I found an updated version of John Gruber's regex for url matching in this post by user GianPac, which states it's been adapted to recognize url without protocol or the www part: (?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.-]+[.][a-z]{2,4}/?)(?:[^\s()<]+|(([^\s()<]+|(([^\s()<]+)))))(?:(([^\s()<]+|(([^\s()<]+))))|[^\s`!()[]{};:'\".,<?«»“”‘’])) Whilst this works in most cases, I found it does not match "google.com". It does match "google.comm" and "google.co.uk", so this must be a small oversight. The trouble is, I literally hate regex. It's the bane of my life. I just want to try and tweak this one more time to allow for "google.com" - can anyone throw me a pointer? I (think) it's something to do with this part of the code: +[.][a-z]{2,4}/?) ?

    Read the article

  • Firebug profiling issue: "no activity to profile"

    - by thermal7
    I want to try some different options with some javascript (jQuery) to see which is the fastest, however I can't get profiling working properly. Here is the code I want to test. $this.keypress(function(e) { console.profile("test"); //retrieve the charcode if possible, otherwise get the keycode k = e.which ? e.which : e.CharCode; if (blockKeyCodes.indexOf("|" + k + "|") != -1 || e.ctrlKey && k == 86) e.preventDefault(); console.profileEnd(); }); However, when I run this the console states "no activity to profile". If I use console.time the result is 0ms. Anyone know how to fix this?

    Read the article

  • What are the implications of having an "implicit declaration of function" warning in C?

    - by SiegeX
    As the question states, what exactly are the implications of having the 'implicit declaration of function' warning? We just cranked up the warning flags on gcc and found quite a few instances of these warnings and I'm curious what type of problems this may have caused prior to fixing them? Also, why is this a warning and not an error. How is gcc even able to successfully link this executable? As you can see in the example below, the executable functions as expected. Take the following two files for example: file1.c #include <stdio.h> int main(void) { funcA(); return 0; } file2.c #include <stdio.h> void funcA(void) { puts("hello world"); } Compile & Output $ gcc -Wall -Wextra -c file1.c file2.c file1.c: In function 'main': file1.c:3: warning: implicit declaration of function 'funcA' $ gcc -Wall -Wextra file1.o file2.o -o test.exe $ ./test.exe hello world

    Read the article

  • How do I determine if my R installation on OS X has the "--enable-R-shlib" option enabled?

    - by Milktrader
    I've installed R on my OS X machine via the .pkg method. I'm trying to get a Ruby gem called RSRuby to work and though it installed correctly, it's throwing an error when I try to invoke the gem. Fatal error: R home directory is not defined Reading the documentation, R should be installed with the option --enable-R-shlib. But the R documentation states that the Mac OS X installation does this by default. How can you verify that this option is enabled on an installation if you don't know it was explicitly called during installation? I'm chasing down why RSRuby can't find R home directory and this seems like the most likely problem.

    Read the article

  • AdMob ad is showing in iOS simulator, but not on iDevice

    - by Ben Toscano
    As the heading states, I can get my AdMob Ad to show in the iOS 5.1 and 6.0 simulator just fine, however, when running my application on my iOS 5.1.1 or 6.0 devices, there is just a blank space where the ad should be served. The code in my .m file is as follows: bannerView_ = [[GADBannerView alloc] initWithFrame:CGRectMake(0.0, 411.0 - GAD_SIZE_320x50.height, GAD_SIZE_320x50.width, GAD_SIZE_320x50.height)]; bannerView_.adUnitID = @"**myID**"; bannerView_.rootViewController = self; [self.view addSubview:bannerView_]; [bannerView_ loadRequest:[GADRequest request]]; //GADRequest *r = [[GADRequest alloc] init]; //r.testing = YES; //[bannerView_ loadRequest:r]; Furthermore, if I initiate testing of ads (see commented-out section), the test ad shows on both the simulator AND my iDevices, which is baffling me! What am I missing? Thanks for your help.

    Read the article

  • Python: User-Defined Exception That Proves The Rule

    - by bandana
    Python documentations states: Exceptions should typically be derived from the Exception class, either directly or indirectly. the word 'typically' leaves me in an ambiguous state. consider the code: class good(Exception): pass class bad(object): pass Heaven = good() Hell = bad() >>> raise Heaven Traceback (most recent call last): File "<pyshell#163>", line 1, in <module> raise Heaven good >>> raise Hell Traceback (most recent call last): File "<pyshell#171>", line 1, in <module> raise Hell TypeError: exceptions must be classes or instances, not bad so when reading the python docs, should i change 'typically' with ''? what if i have a class hierarchy that has nothing to do with the Exception class, and i want to 'raise' objects belonging to the hierarchy? i can always raise an exception with an argument: raise Exception, Hell This seems slightly awkward to me What's so special about the Exception class, that only its family members can be raised?

    Read the article

  • Scrape zipcode table for different urls based on county

    - by Dr.Venkman
    I used lxml and ran into a wall as my new computer wont install lxml and the code doesnt work. I know this is simple - maybe some one can help with a beautiful soup script. this is my code: import codecs import lxml as lh from selenium import webdriver import time import re results = [] city = [ 'amador'] state = [ 'CA'] for state in states: for city in citys: browser = webdriver.Firefox() link2 = 'http://www.getzips.com/cgi-bin/ziplook.exe?What=3&County='+ city +'&State=' + state + '&Submit=Look+It+Up' browser.get(link2) bcontent = browser.page_source zipcode = bcontent[bcontent.find('<td width="15%"'):bcontent.find('<p>')+0] if len(zipcode) > 0: print zipcode else: print 'none' browser.quit() Thanks for the help

    Read the article

  • Implementing a multi-state planner

    - by MoominTroll
    I've been asked to develop a system wherein employees can mark on a form their availability on a given day of the week - for instance an employee could mark themselves as available on a given time on a given week, and unavailable on some other time. It looks a little like this: Currently this works by rendering checkboxes within the table, picking up click events in each cell and marking the checkbox and hence the cell appropriately. I'm using the JQuery "click n drag checkbox" plugin from here. However, I've been informed that there could well be more than two states for a given cell (for instance available, unavailable, available in a given circumstance), in which case binding to a checkboxes checked value isnt going to be a lot of help. I've never used javascript or asp.net before and am unsure as to the best way to approach this problem. Ideally I could stick a data structure behind each cell which I could update to a certain state and then get my cell colour by binding to this - however I'm at something as a loss as how to best achieve this.

    Read the article

  • SQL Get Latest Unique Rows

    - by Simpleton
    I have a log table, each row representing an object logging its state. Each object has a unique, unchanging GUID. There are multiple objects logging their states, so there will be thousands of entries, with objects continually inserting new logs. Everytime an object checks in, it is via an INSERT. I have the PrimaryKey, GUID, ObjectState, and LogDate columns in tblObjects. I want to select the latest (by datetime) log entry for each unique GUID from tblObjects, in effect a 'snapshot' of all the objects. How can this be accomplished?

    Read the article

  • How to condense onclick code to be dynamic

    - by opbeta
    I am trying to get this onclick function code to be dynamic. I do not want to have 50 blocks of code for all the states. He is a quick snippet of the code var Ohio=function(){ document.getElementById('texas').style.display='none'; document.getElementById('florida').style.display='none'; document.getElementById('ohio').style.display='block'; } and so on and so forth..... How would I go about condensing this to make it smaller and dynamic?

    Read the article

  • performing a javascript event without triggering that event handler

    - by bento
    In my latest code, I have an event handler for a focus on a textarea. When the user clicks on the textarea, that event-handler is triggered which sets some other DOM states based on the selected textarea. However, elsewhere in my program I want to programmatically set the focus of the textarea without triggering that event handler. I know Backbone, for instance, has a way to silently perform an action. My only pseudo-solution is to temporarily set a variable: var silence = true; And then, in my event handler, only perform the logic if silence is false. The handler is still triggered, but the logic doesn't run. Does anyone else know of better strategies for this?

    Read the article

  • Having issues when trying to insert an ajax response which is an html block into an element on IE 8

    - by user340812
    Hello Everyone just like my title states, I am having issues with IE8 and innerHTML. For whatever reason, when I make an ajax call which returns an html block and try to insert it into an element using innerHTML, the browser gives me an error "Unknown Error Code: 0". The interesting part of this is that, if the message response does not have html element, innerHTML works. My code is like so: setTimeout(function() { element.innerHTML = context.response.message; }, 1000).bind(context) WORKS: context.response.message = 'String'; Does not WORK: context.response.message = '<p>String</p>';

    Read the article

  • Confusion about Nullable<T> constraints

    - by n535
    Greetings everybody. I am sorry, if this was already asked before (searched in vain) or is really very simple, but i just can't get it. The MSDN definition of a Nullable type, states, that it is defined in a following manner: [SerializableAttribute] public struct Nullable<T> where T : struct, new() So the question is quite straightforward: How is this definition possible? Or this is just a typo? Every value type already has a default constructor. Indeed, when i try to compile something like this, the compiler reasonably says, that it is illegal to apply both constraints at the same time, because the second one is implicitly included in a first one. Thanks in advance.

    Read the article

  • speed up the speed of a sql query to mysql?

    - by fayer
    in my mysql database i've got the geonames database, containing all countries, states and cities. i am using this to create a cascading menu so the user could select where he is from: country - state - county - city. but the main problem is that the query will search through all the 7 millions rows in that table each time i want to get the list of children rows, and that is taking a while 10-15 seconds. i wonder how i could speed this up: caching? table views? reorganizing table structure somehow? and most important, how do i do these things? are there good tutorials you could link to me? i appreciate all help and feedback discussing smart ways of handling this issue!

    Read the article

  • Where are the snapshot files?

    - by KiD0M4N
    Hey guys, The documentation states that the snapshots are persisted to S3 for persistence... I wanted to leverage that and create a instance of my server in a different region (my original server is in APAC, I wanted to create an instance in US-East.) I have logged into my account via CloudBerry S3, but cannot see any files in the S3 account (sorry, I am beginner in AWS.) Also, switching over to US-East removes the snapshot from view... so how can I create another instance using the same EBS volume in a different region? Why can't I see the snapshot files in my S3? Regards, Karan Misra

    Read the article

< Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >