Search Results

Search found 6630 results on 266 pages for 'cname record'.

Page 62/266 | < Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >

  • Google Apps e-mail being rejected from some domains

    - by Paul J. Lucas
    I'm migrating e-mail for my domains to Google Apps' e-mail. Most everything seems to work except e-mail sent to any user at (at least) sonic.net is rejected with a message of the form (where any-address has been substituted for my friend's address): From: Mail Delivery Subsystem <[email protected]> Date: March 11, 2010 10:04:48 AM PST To: [email protected] Subject: Delivery Status Notification (Failure) Delivered-To: [email protected] Received: by 10.229.194.26 with SMTP id dw26cs8717qcb; Thu, 11 Mar 2010 10:04:48 -0800 (PST) Received: by 10.223.68.143 with SMTP id v15mr3841599fai.62.1268330688325; Thu, 11 Mar 2010 10:04:48 -0800 (PST) Received: by 10.223.68.143 with SMTP id v15mr5119424fai.62; Thu, 11 Mar 2010 10:04:48 -0800 (PST) Mime-Version: 1.0 Return-Path: <> X-Failed-Recipients: [email protected] Message-Id: <[email protected]> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Delivery to the following recipient failed permanently: [email protected] Technical details of permanent failure: Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 550 550 5.1.1 <[email protected]>... No such user here (state 13). And here are the headers from the message it bounces back: Received: by 10.101.90.7 with SMTP id s7mr2515885anl.176.1267979929490; Sun, 07 Mar 2010 08:38:49 -0800 (PST) Return-Path: <[email protected]> Received: from [10.0.1.203] (adsl-76-201-171-194.dsl.pltn13.sbcglobal.net [76.201.171.194]) by mx.google.com with ESMTPS id 4sm1046550yxd.70.2010.03.07.08.38.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 07 Mar 2010 08:38:49 -0800 (PST) From: "Paul J. Lucas" <[email protected]> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Some fascinating subject Date: Sun, 7 Mar 2010 08:38:46 -0800 References: <[email protected]> To: [email protected] Message-Id: <[email protected]> Mime-Version: 1.0 (Apple Message framework v1077) X-Mailer: Apple Mail (2.1077) However, I am able to send mail to a user at sonic.net using my old e-mail account. Also, my company uses Google Apps for e-mail and I can send e-mail to a user at sonic.net from my company. The differences between my personal e-mail and my company's are: My company's domain has no SPF record whereas mine does. My company's domain has an A record whereas mine does not. My SPF record initially was as prescribed by Google here. However, this guy claims Google is wrong and gives a fix. I've tried it both ways with no difference. My SPF record is currently: v=spf1 mx include:aspmx.googlemail.com include:_spf.google.com ~all As for the lack of an A record, you wouldn't think that a mail host would care about that so long as mx records are defined. However, the funny thing is that if you look at the error message, why does Google state that the recipient's domain stated that there is "No such user here" for my address? That makes no sense. Of course there is no user having my address at sonic.net. Also, I assume that I just discovered that I can't send mail to users at sonic.net by accident and that there are probably other domains I can't send e-mail to. So... anybody have any idea what's going on? And how I can get mail to users at sonic.net?

    Read the article

  • DNS - domain conflict?

    - by Stefanos.Ioannou
    I was given two domains: domain.com & domain.info (they are on GoDaddy). And I was also given two servers, 107.105.38.99 - Rails app and 107.107.90.17 - Wordpress platform, on Digital Ocean. At first, I was instructed to associate domain.com with the 107.107.38.99 (Rails app). Then I was instructed to de-associate this IP with domain.com and associated the 107.107.90.17 with the domain name domain.com. Then I was instructed to associated domain.info with the 107.107.38.99 (Rails app). Right now, when I go to domain.com the WordPress platform (107.107.90.17) loads fine and that is what is expected. But when I go to domain.info for the Rails app (107.107.38.99) I get redirected to domain.com. This is not expected and this is really weird for me. When I ping domain.info I get this: PING domain.info (107.107.38.99): 56 data bytes 64 bytes from 107.107.38.99: icmp_seq=0 ttl=50 time=74.601 ms Which is the expected result showing the correct IP but I don't understand why I get redirected to domain.com...(which when I ping is:) domain 64 bytes from 107.107.90.17: icmp_seq=0 ttl=50 time=75.057 ms The PTR Records on Digital Ocean are as follows: IP Address PTR Record 107.107.38.99 domain.info. 107.107.90.17 domain.com. and the DNS configurations on Digital Ocean are: domain.com A: @ 107.107.90.17 CNAME: * @ domain.info A: @ 107.107.38.99 CNAME: * @ I am not sure what the issue is, if you have any clue please let me know, I will be really grateful. If you need any other info let me know.

    Read the article

  • Alias multiple DNS entries to one Amazon S3 Bucket

    - by Tristan
    I have a bucket on Amazon S3. Lets call it "webstatic.mydomain.com". I have a DNS alias setup for that bucket webstatic.mydomain.com CNAME - web-static.mydomain.com.s3.amazonaws.com. This all works great, however for some rather complicated reasons I now need: webstatic.myOtherDomain.com to point to that same amazon bucket so: webstatic.myOtherDomain.com CNAME - web-static.mydomain.com.s3.amazonaws.com. Fails, as the bucket is not called the same as the referring DNS. Can anyone tell me how to have two different DNS entries pointing to the same amazon bucket?

    Read the article

  • Controlling soft errors and false alarms in SSIS

    - by Jim Giercyk
    If you are like me, you dread the 3AM wake-up call.  I would say that the majority of the pages I get are false alarms.  The alerts that require action often require me to open an SSIS package, see where the trouble is and try to identify the offending data.  That can be very time-consuming and can take quite a chunk out of my beauty sleep.  For those reasons, I have developed a simple error handling scenario for SSIS which allows me to rest a little easier.  Let me first say, this is a high level discussion; getting into the nuts and bolts of creating each shape is outside the scope of this document, but if you have an average understanding of SSIS, you should have no problem following along. In the Data Flow above you can see that there is a caution triangle.  For the purpose of this discussion I am creating a truncation error to demonstrate the process, so this is to be expected.  The first thing we need to do is to redirect the error output.  Double-clicking on the Query shape presents us with the properties window for the input.  Simply set the columns that you want to redirect to Redirect Row in the dropdown box and hit Apply. Without going into a dissertation on error handling, I will just note that you can decide which errors you want to redirect on Error and on Truncation.  Therefore, to override this process for a column or condition, simply do not redirect that column or condition. The next thing we want to do is to add some information about the error; specifically, the name of the package which encountered the error and which step in the package wrote the record to the error table.  REMEMBER: If you redirect the error output, your package will not fail, so you will not know where the error record was created without some additional information.    I added 3 columns to my error record; Severity, Package Name and Step Name.  Severity is just a free-form column that you can use to note whether an error is fatal, whether the package is part of a test job and should be ignored, etc.  Package Name and Step Name are system variables. In my package I have created a truncation situation, where the firstname column is 50 characters in the input, but only 4 characters in the output.  Some records will pass without truncation, others will be sent to the error output.  However, the package will not fail. We can see that of the 14 input rows, 8 were redirected to the error table. This information can be used by another step or another scheduled process or triggered to determine whether an error should be sent.  It can also be used as a historical record of the errors that are encountered over time.  There are other system variables that might make more sense in your infrastructure, so try different things.  Date and time seem like something you would want in your output for example.  In summary, we have redirected the error output from an input, added derived columns with information about the errors, and inserted the information and the offending data into an error table.  The error table information can be used by another step or process to determine, based on the error information, what level alert must be sent.  This will eliminate false alarms, and give you a head start when a genuine error occurs.

    Read the article

  • Is it possible to have multiple subdomains point to the same Blogger blog?

    - by cclark
    For our application we want to have a status page which is hosted outside of the rest of our infrastructure so in case there are issues in our data center we can post updates for our users and our users will be able to access them. We registered a blog on Blogger and set it up with xyzstatus.blogspot.com and status.xyz.com. Everything seems to work fine. We need to perform some maintenance at our datacenter which will sever all connectivity so we're unable to have a redirect using nginx or apache. We'd like to do this with a short TTL CNAME DNS entry. Ideally www.xyz.com and app.xyz.com could be CNAMEd to status.xyz.com. When I setup the CNAME and go to that URL I get a Google broken robot 404 page. I figure I must need to let Google know it should associate traffic to www.xyz.com and app.xyz.com to the blog served up by status.xyz.com. But I can't see anywhere to do this in Blogger. Does anyone know if this is possible?

    Read the article

  • django/python: is one view that handles two sibling models a good idea?

    - by clime
    I am using django multi-table inheritance: Video and Image are models derived from Media. I have implemented two views: video_list and image_list, which are just proxies to media_list. media_list returns images or videos (based on input parameter model) for a certain object, which can be of type Event, Member, or Crag. The view alters its behaviour based on input parameter action (better name would be mode), which can be of value "edit" or "view". The problem is that I need to ask whether the input parameter model contains Video or Image in media_list so that I can do the right thing. Similar condition is also in helper method media_edit_list that is called from the view. I don't particularly like it but the only alternative I can think of is to have separate (but almost the same) logic for video_list and image_list and then probably also separate helper methods for videos and images: video_edit_list, image_edit_list, video_view_list, image_view_list. So four functions instead of just two. That I like even less because the video functions would be very similar to the respective image functions. What do you recommend? Here is extract of relevant parts: http://pastebin.com/07t4bdza. I'll also paste the code here: #urls url(r'^media/images/(?P<rel_model_tag>(event|member|crag))/(?P<rel_object_id>\d+)/(?P<action>(view|edit))/$', views.image_list, name='image-list') url(r'^media/videos/(?P<rel_model_tag>(event|member|crag))/(?P<rel_object_id>\d+)/(?P<action>(view|edit))/$', views.video_list, name='video-list') #views def image_list(request, rel_model_tag, rel_object_id, mode): return media_list(request, Image, rel_model_tag, rel_object_id, mode) def video_list(request, rel_model_tag, rel_object_id, mode): return media_list(request, Video, rel_model_tag, rel_object_id, mode) def media_list(request, model, rel_model_tag, rel_object_id, mode): rel_model = tag_to_model(rel_model_tag) rel_object = get_object_or_404(rel_model, pk=rel_object_id) if model == Image: star_media = rel_object.star_image else: star_media = rel_object.star_video filter_params = {} if rel_model == Event: filter_params['event'] = rel_object_id elif rel_model == Member: filter_params['members'] = rel_object_id elif rel_model == Crag: filter_params['crag'] = rel_object_id media_list = model.objects.filter(~Q(id=star_media.id)).filter(**filter_params).order_by('date_added').all() context = { 'media_list': media_list, 'star_media': star_media, } if mode == 'edit': return media_edit_list(request, model, rel_model_tag, rel_object_id, context) return media_view_list(request, model, rel_model_tag, rel_object_id, context) def media_view_list(request, model, rel_model_tag, rel_object_id, context): if request.is_ajax(): context['base_template'] = 'boxes/base-lite.html' return render(request, 'media/list-items.html', context) def media_edit_list(request, model, rel_model_tag, rel_object_id, context): if model == Image: get_media_edit_record = get_image_edit_record else: get_media_edit_record = get_video_edit_record media_list = [get_media_edit_record(media, rel_model_tag, rel_object_id) for media in context['media_list']] if context['star_media']: star_media = get_media_edit_record(context['star_media'], rel_model_tag, rel_object_id) else: star_media = None json = simplejson.dumps({ 'star_media': star_media, 'media_list': media_list, }) return HttpResponse(json, content_type=json_response_mimetype(request)) def get_image_edit_record(image, rel_model_tag, rel_object_id): record = { 'url': image.image.url, 'name': image.title or image.filename, 'type': mimetypes.guess_type(image.image.path)[0] or 'image/png', 'thumbnailUrl': image.thumbnail_2.url, 'size': image.image.size, 'id': image.id, 'media_id': image.media_ptr.id, 'starUrl':reverse('image-star', kwargs={'image_id': image.id, 'rel_model_tag': rel_model_tag, 'rel_object_id': rel_object_id}), } return record def get_video_edit_record(video, rel_model_tag, rel_object_id): record = { 'url': video.embed_url, 'name': video.title or video.url, 'type': None, 'thumbnailUrl': video.thumbnail_2.url, 'size': None, 'id': video.id, 'media_id': video.media_ptr.id, 'starUrl': reverse('video-star', kwargs={'video_id': video.id, 'rel_model_tag': rel_model_tag, 'rel_object_id': rel_object_id}), } return record # models class Media(models.Model, WebModel): title = models.CharField('title', max_length=128, default='', db_index=True, blank=True) event = models.ForeignKey(Event, null=True, default=None, blank=True) crag = models.ForeignKey(Crag, null=True, default=None, blank=True) members = models.ManyToManyField(Member, blank=True) added_by = models.ForeignKey(Member, related_name='added_images') date_added = models.DateTimeField('date added', auto_now_add=True, null=True, default=None, editable=False) class Image(Media): image = ProcessedImageField(upload_to='uploads', processors=[ResizeToFit(width=1024, height=1024, upscale=False)], format='JPEG', options={'quality': 75}) thumbnail_1 = ImageSpecField(source='image', processors=[SmartResize(width=178, height=134)], format='JPEG', options={'quality': 75}) thumbnail_2 = ImageSpecField(source='image', #processors=[SmartResize(width=256, height=192)], processors=[ResizeToFit(height=164)], format='JPEG', options={'quality': 75}) class Video(Media): url = models.URLField('url', max_length=256, default='') embed_url = models.URLField('embed url', max_length=256, default='', blank=True) author = models.CharField('author', max_length=64, default='', blank=True) thumbnail = ProcessedImageField(upload_to='uploads', processors=[ResizeToFit(width=1024, height=1024, upscale=False)], format='JPEG', options={'quality': 75}, null=True, default=None, blank=True) thumbnail_1 = ImageSpecField(source='thumbnail', processors=[SmartResize(width=178, height=134)], format='JPEG', options={'quality': 75}) thumbnail_2 = ImageSpecField(source='thumbnail', #processors=[SmartResize(width=256, height=192)], processors=[ResizeToFit(height=164)], format='JPEG', options={'quality': 75}) class Crag(models.Model, WebModel): name = models.CharField('name', max_length=64, default='', db_index=True) normalized_name = models.CharField('normalized name', max_length=64, default='', editable=False) type = models.IntegerField('crag type', null=True, default=None, choices=crag_types) description = models.TextField('description', default='', blank=True) country = models.ForeignKey('country', null=True, default=None) #TODO: make this not null when db enables it latitude = models.FloatField('latitude', null=True, default=None) longitude = models.FloatField('longitude', null=True, default=None) location_index = FixedCharField('location index', length=24, default='', editable=False, db_index=True) # handled by db, used for marker clustering added_by = models.ForeignKey('member', null=True, default=None) #route_count = models.IntegerField('route count', null=True, default=None, editable=False) date_created = models.DateTimeField('date created', auto_now_add=True, null=True, default=None, editable=False) last_modified = models.DateTimeField('last modified', auto_now=True, null=True, default=None, editable=False) star_image = models.ForeignKey('Image', null=True, default=None, related_name='star_crags', on_delete=models.SET_NULL) star_video = models.ForeignKey('Video', null=True, default=None, related_name='star_crags', on_delete=models.SET_NULL)

    Read the article

  • Configure Postini and emailreg.org

    - by crn
    One of our companies uses Postini services as our spam filtering service. Unfortunately, the company has been tagged as a spammer and we're trying to use emailreg.org to whitelist us. Emailreg.org wants us to add a CNAME which points to their domain (emaireg.org), while Postini has us add MX records (such as domainname.s7a1.psmtp.com. Here are my questions: 1. Can adding Emaireg's CNAME cause either Postini to not work or our emails to be lost? 2. Which is order of execution (do the email go to Postini and upon their return to EmailReg or is it the other way around)? 3. Is there anything of which I should be aware when using such a setup? Thanks, in advance, for all your help!

    Read the article

  • How do I configure namecheap for "arbitrarily-nested" wildcard subdomains?

    - by rabidsnail
    I'm trying to set up something like nyud.net, where any arbitrary chain of subdomains resolves to the same CNAME record (which in my case points to an amazon elastic load balancer). Ex: www.gogle.com.nyud.net:8080 points to one of their cache servers, which looks at the HOST header and returns www.google.com. I'm using namecheap as my dns host. Adding a CNAME record for *.mydomain.com doesn't seem to do anything (nslookup gives NXDOMAIN for all subdomains). What do I have to do to set this up? Do I have to use something fancier than namecheap (like route53)?

    Read the article

  • Selective Suppression of Log Messages

    - by Duncan Mills
    Those of you who regularly read this blog will probably have noticed that I have a strange predilection for logging related topics, so why break this habit I ask?  Anyway here's an issue which came up recently that I thought was a good one to mention in a brief post.  The scenario really applies to production applications where you are seeing entries in the log files which are harmless, you know why they are there and are happy to ignore them, but at the same time you either can't or don't want to risk changing the deployed code to "fix" it to remove the underlying cause. (I'm not judging here). The good news is that the logging mechanism provides a filtering capability which can be applied to a particular logger to selectively "let a message through" or suppress it. This is the technique outlined below. First Create Your Filter  You create a logging filter by implementing the java.util.logging.Filter interface. This is a very simple interface and basically defines one method isLoggable() which simply has to return a boolean value. A return of false will suppress that particular log message and not pass it onto the handler. The method is passed the log record of type java.util.logging.LogRecord which provides you with access to everything you need to decide if you want to let this log message pass through or not, for example  getLoggerName(), getMessage() and so on. So an example implementation might look like this if we wanted to filter out all the log messages that start with the string "DEBUG" when the logging level is not set to FINEST:  public class MyLoggingFilter implements Filter {     public boolean isLoggable(LogRecord record) {         if ( !record.getLevel().equals(Level.FINEST) && record.getMessage().startsWith("DEBUG")){          return false;            }         return true;     } } Deploying   This code needs to be put into a JAR and added to your WebLogic classpath.  It's too late to load it as part of an application, so instead you need to put the JAR file into the WebLogic classpath using a mechanism such as the PRE_CLASSPATH setting in your domain setDomainEnv script. Then restart WLS of course. Using The final piece if to actually assign the filter.  The simplest way to do this is to add the filter attribute to the logger definition in the logging.xml file. For example, you may choose to define a logger for a specific class that is raising these messages and only apply the filter in that case.  <logger name="some.vendor.adf.ClassICantChange"         filter="oracle.demo.MyLoggingFilter"/> You can also apply the filter using WLST if you want a more script-y solution.

    Read the article

  • How to point subdomain to a nameserver?

    - by vonconrad
    I've got an old crusty WHM/cPanel server which I'm trying to get rid of. I've got a new setup on shared hosting which is much cheaper in the long run. The problem is that there are a bunch of websites on the server whose domains I don't have access to. They're currently pointing to name servers of my domain (ns.mydomain.com), but the new provider has their own name servers (ns.provider.com) which I have to use instead. My initial idea was to set up a CNAME to point my name server to my provider's: ns.mydomain.com CNAME ns.provider.com, but I read in this question that this would be a bad idea. The accepted answer suggests using an A record instead, and I want to make sure how this would work. Assuming ns.provider.com has an IP address of 123.123.123.123, is it just a matter of doing ns.mydomain.com A 123.123.123.123? Is there any way the provider could block those requests as the name server domain technically doesn't belong to them?

    Read the article

  • BIND: How do I allow DNS query from specific external host?

    - by krbvroc1
    I'm running Centos 5.8 (bind 9.3.6). Here is my issue... I run my own DNS server to serve the local machine. I would like to use my DNS server from home. Since my home is a dynamic IP address, I am not sure how this would be accomplished. In my named.conf, there is an allow-query{} and allow-recursion{}. It seems both of those take an IP address, but i need to specify a hostname (at least a cname). This is not a public DNS server (so any is not an option). My hostname/cname is already updated automatically using nsupdate. The only solution I can think of, which I do not like, is to change my nsupdate script to somehow modify the named.conf to search/replace the allow-query/recursion IP address. That would require restarting named whenever the hostname changes as well as Is there some other way to handle this?

    Read the article

  • xmlpullparser(), whats wrong with my code?

    - by Avinazz
    I am expecting output to be an array list filled with all items as "thought" but instead, every time i add a value into arraylist, the previous value in list also gets update with new, hence resulting in duplicates. This behaviour goes on till end. Even though i have achieved the result by changing the approach, failure of my previous approach still bothers me. Any help or pointer will be really appreciated. Below is xml snippet: <Thoughts> <country> <name>India</name> <item> <itemId>1</itemId> <itemDetailImage>detail.png</itemDetailImage> <itemImage>image1.png</itemImage> <itemDesc>Item Description 1</itemDesc> <itemTitle>Item Title 1</itemTitle> </item> <item> <itemId>2</itemId> <itemDetailImage>detail2.png</itemDetailImage> <itemImage>image2.png</itemImage> <itemDesc>Item Description 2</itemDesc> <itemTitle>Item Title 2</itemTitle> </item> <item> <itemId>3</itemId> <itemDetailImage>detail3.png</itemDetailImage> <itemImage>image3.png</itemImage> <itemDesc>Item Description 3</itemDesc> <itemTitle>Item Title 3</itemTitle> </item> Below is a method for my trial and error: private void printAll() throws XmlPullParserException, IOException{ XmlPullParserFactory factory = XmlPullParserFactory.newInstance(); factory.setNamespaceAware(false); XmlPullParser parser = factory.newPullParser(); URL url = new URL("http://192.168.1.3/DefaultXML.xml"); URLConnection ucon = url.openConnection(); InputStream is = ucon.getInputStream(); parser.setInput(is, null); int eventType = parser.getEventType(); String name; while(eventType != parser.END_DOCUMENT){ if(eventType == parser.START_DOCUMENT){ Log.i(TAG,"Start document"); }else if (eventType == parser.START_TAG ) { name = parser.getName(); if(name.equalsIgnoreCase(NAME)){ this.cName = new Country(); this.cName.setName(parser.nextText()); }else if(name.equalsIgnoreCase(ITEM_DESC)){ this.thought.setItemDesc(parser.nextText()); }else if (name.equalsIgnoreCase(ITEM_ID)) { this.thought.setItemID(parser.nextText()); }else if (name.equalsIgnoreCase(ITEM_DETAIL_IMAGE)) { this.thought.setItemDetailImage(parser.nextText()); }else if (name.equalsIgnoreCase(ITEM_IMAGE)) { this.thought.setItemImage(parser.nextText()); }else if (name.equalsIgnoreCase(ITEM_TITLE)) { this.thought.setItemTitle(parser.nextText()); } }else if (eventType == parser.END_TAG) { name = parser.getName(); if(name.equalsIgnoreCase(ITEM)) { this.cName.setThought(this.thought); ctry.add(cName); this.thought = new Thought(); } } eventType = parser.next(); } //Log.i(TAG,"---" + ctry.toString()); }

    Read the article

  • LINQ to Entities exceptions (ElementAtOrDefault and CompareObjectEqual)

    - by OffApps Cory
    I am working on a shipping platform which will eventually automate shipping through several major carriers. I have a ShipmentsView Usercontrol which displayes a list of Shipments (returned by EntityFramework), and when a user clicks on a shipment item, it spawns a ShipmentEditView and passes the ShipmentID (RecordKey) to that view. I initially wrestled with trying to get the context from the parent (ShipmentsView) and finally gave up resolving to get to it later. I wanted to do this to keep a single instance of the context. anyhow, I now create a new instance of the context in my ShipmentEditViewModel, and query against it for the Shipment record. I know I could just pass the record, but I wanted to use the Ocean Framework that Karl Shifflett wrote and don't want to muck about writing new transition methods. So anyhow, I query and when stepping through, I can see that it returns a record, as soon as execution reached the point where it assigned the query result to the e.Result property, it throws up the following exception depending on the query I used. LINQToEntities Dim RecordID As Decimal = CDec(e.Argument) Dim myResult = From ship In _Context.Shipment _ Where ship.ShipID = e.Argument _ Select ship Select Case myResult.Count Case 0 e.Result = New Shipment Case 1 e.Result = myResult(0) Case Else e.Result = Nothing End Select "LINQ to Entities does not recognize the method 'System.Object.CompareObjectEqual(System.Object, System.Object, Boolean)' method, and this method cannot be translated into a store expression. LINQToEntities via Method calls Dim RecordID As Decimal = CDec(e.Argument) Dim myResult = _Context.Shipment.Where(Function(s) s.ShipID = RecordID) Select Case myResult.Count Case 0 e.Result = New Shipment Case 1 e.Result = myResult(0) Case Else e.Result = Nothing End Select LINQ to Entities does not recognize the method 'SnazzyShippingDAL.Shipment ElementAtOrDefault[Shipment] (System.Linq.IQueryable`1[SnazzyShippingDAL.Shipment], Int32)' method, and this method cannot be translated into a store expression. I have been trying to get this thing to display a record for like three days. i am seriously thinking about going back and re=-engineering it without the MVVM pattern (which I realize I am only starting to learn and understand) if only to make the &$^%ed thing work. Any help will be muchly appreciated. Cory

    Read the article

  • iPhone Development - CLLocationManager vs. MapKit

    - by Mustafa
    If i want to show userLocation on the map, and at the same time record the user's location, is it a good idea to add an observer to userLocation.location and record the locations, OR should i still use CLLocationManager for recording user location and use mapView.showUserLocation to show the user's current location (blue indicator)? I want to show the default blue indicator supported by the MapKit API. Also, here's a rough sample code: - (void)viewDidLoad { ... locationManager = [[CLLocationManager alloc] init]; locationManager.desiredAccuracy = kCLLocationAccuracyBest; locationManager.distanceFilter = DISTANCE_FILTER_VALUE; locationManager.delegate = self; [locationManager startUpdatingLocation]; myMapView.showUserLocation = YES; [myMapView addObserver:self forKeyPath:@"userLocation.location" options:0 context:nil]; ... } - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { // Record the location information // ... } - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { NSLog(@"%s begins.", __FUNCTION__); // Make sure that the location returned has the desired accuracy if (newLocation.horizontalAccuracy <= manager.desiredAccuracy) return; // Record the location information // ... } Under the hood, i think MKMapView also uses CLLocationManager to get user's current location? So, will this create any problems because i believe both CLLocationManager and MapView will try to use same location services? Will there be any conflicts and lack of accurate/required or current data?

    Read the article

  • accepts_nested_attributes_for and nested_form plugin

    - by Denis
    Hi folks, I've the following code in a _form.html.haml partial, it's used for new and edit actions. (fyi I use the Ryan Bates' plugin nested_form) .fields - f.fields_for :transportations do |builder| = builder.collection_select :person_id, @people, :id, :name, {:multiple => true} = builder.link_to_remove 'effacer' = f.link_to_add "ajouter", :transportations works fine for the new action... for the edit action, as explain in the doc, I've to add the :id of already existing associations, so, I've to add something like = builder.hidden_field :id, ?the value? if ?.new_record? How can I get the value? Here is the doc of accepts_nested_attributes_for for reference (source: http://github.com/rails/rails/blob/master/activerecord/lib/active_record/nested_attributes.rb#L332) # Assigns the given attributes to the collection association. # # Hashes with an <tt>:id</tt> value matching an existing associated record # will update that record. Hashes without an <tt>:id</tt> value will build # a new record for the association. Hashes with a matching <tt>:id</tt> # value and a <tt>:_destroy</tt> key set to a truthy value will mark the # matched record for destruction. # # For example: # # assign_nested_attributes_for_collection_association(:people, { # '1' => { :id => '1', :name => 'Peter' }, # '2' => { :name => 'John' }, # '3' => { :id => '2', :_destroy => true } # }) # # Will update the name of the Person with ID 1, build a new associated # person with the name `John', and mark the associatied Person with ID 2 # for destruction. # # Also accepts an Array of attribute hashes: # # assign_nested_attributes_for_collection_association(:people, [ # { :id => '1', :name => 'Peter' }, # { :name => 'John' }, # { :id => '2', :_destroy => true } # ]) Thanks for your help.

    Read the article

  • Listing down stored records localStorage | Google Chrome Extensions

    - by Jamie
    How do I get to list down the stored records in the for loop? Basically I want it to list down the records like this: '<div id="record_' + number + '">' + localstorage value + '</div>' The number in the class should add 1 every record, e.g. 1, 2, 3, 4 every record it lists down, and so on. The localstorage value should show the localStorage[] but the problem is, the localStorage name has the same, e.g. (clicks on button) it will save the value of the URL into a localStorage I then open the application and shows the window.html inside there is list of stored records by using this: '<div id="record_' + number + '">' + localstorage value + '</div>' INCLUDING the record number to add per record 1, 2, 3, etc... like this: <div id="record_1">localstorage value</div> <div id="record_2">localstorage value</div> <div id="record_3">localstorage value</div> <div id="record_4">localstorage value</div> <div id="record_5">localstorage value</div> <div id="record_6">localstorage value</div> etc...

    Read the article

  • Silverlight MVVM binding seems not to work

    - by Savvas Sopiadis
    Hi everybody! Building my first SL MVVM application (Silverlight4 RC) and have some issues i don't understand. Having a WPF background i don't know what is going on here: ViewModel has several properties, in which one is called SelectedRecord. This is a get only property and is defined like this: public Culture SelectedRecord { get { return culturesView.View.CurrentItem as Culture; } } As you can see it is gets the current value of a CollectionViewSource (called culturesView). So if i select a Culture, the SelectedRecord (gets a value directly from within the CollectionViewSource) as expected. (Actually there is a datagrid control bound to the CollectionViewSource, hence it is possible to change the selected item) OK. Now to the View . There are several views which access this ViewModel and in particular there is one which shows the values of the aforementioned property SelectedRecord (let's call it the EditView). To show this EditView there is a button (which has its Command property bound to an ICommand in the ViewModel) which functions (the first time) as expected. This means: 1st try : i select a record, switch to EditView, outcome: selected record values are shown (as expected!!). 2nd try: switch back to datagrid, select another record, switch to EditView, outcome: the values of the previous shown record are shown again!!! WHY?? First i thought that the SelectedRecord has not the correct value set, but i was mistaken: it HAS the correct value! So it should be shown!? What am i missing? In WPF this would work!! Thanks in advance

    Read the article

  • Javascript: Error 'Object Required.'

    - by javascripthelp
    The following is the error popup message I get when I click "Finalize" button on my website: "Line: 298 Char: 5 Error: Object required: 'lobi_c_selected(...)' Code: 0 URL: http://10.128.23.50/i-prostage/AP/w_ap_check_reconciliation.asp?" Normally, when I click "Finalize" button, it'll generate and show a report in a popup window. However, I'd get this error message instead. Can any of you help me locate the error in the following source code for the page that I'm running in IE 6? sub cb_finalize dim ll_loop, ll_found, lobj_c_selected of_SetHourGlass(True) rpt_link.innerHTML = "" rpt_link.href = "" 'Process only if at least one record was selected if rds1.Recordset.Recordcount 0 then lb_found = false if rds1.Recordset.Recordcount = 1 then if c_selected.checked then lb_found = true else Set lobj_c_selected = document.all.item("c_selected") for ll_loop = 1 to rds1.Recordset.Recordcount if lobj_c_selected(ll_loop - 1).checked then lb_found = true exit for end if next end if if not lb_found then msgbox "Please select a record to be posted.", vbInformation, "ProStage Accounting" of_SetHourGlass(False) else window.setTimeout "ue_process()", 100, vbscript 'Post Event end if else msgbox "There's no record to be posted." + vbcrlf + "Please select a record to be posted.", vbInformation, "ProStage Accounting" of_SetHourGlass(False) end if end sub Sub ue_process dim ll_loop, ll_count, ls_ret, ls_trxid, ls_r1 'Get only selected records redim ls_trxid(rds1.Recordset.Recordcount) for ll_loop = 1 to rds1.Recordset.Recordcount rds1.Recordset.AbsolutePosition = ll_loop if not isnull(rds1.Recordset("clrdt")) then 'Add to TRXID array if selected ll_count = ll_count + 1 ls_trxid(ll_count) = rds1.Recordset("trxid") end if next 'Process reconciliation rds1.Recordset.MarshalOptions = 1 ls_ret = iBO_Update.of_update_1(is_dbsrc, rds1.Recordset, "GLTRX", is_sql) if ls_ret < "1" then msgbox "Update Failed ! " + ls_ret, vbExclamation + vbOKonly, document.title of_SetHourGlass(False) else 'Display Posting Journal & clear screen ue_posting_journal ls_trxid, ll_count Set rds1.SourceRecordset = iBO_Company.of_validate(is_dbsrc, "SELECT 1 FROM DUAL WHERE 1 = 2") ib_query = false 'Not to process RetrieveEnd end if End Sub Sub ue_posting_journal(as_trxid, al_count) dim ll_argseq, ls_argtyp, ls_argmnt, ll_sargseq of_setreport() ' Start service 'Prepare arguments for report in RPTMSTR table for ll_loop = 1 to al_count + 1 select case ll_loop case 1 'Range displayed as report title ll_argseq = 800 ls_argtyp = null ls_argmnt = "st_title.text = 'Bank: " + bnkid_name.value + ", As of Date: " + _ of_date_stringtodate(id_trxdt) + "'" ll_sargseq = 0 case else 'TRXID array ll_argseq = 1 ll_sargseq = ll_loop - 1 ls_argtyp = "S" ls_argmnt = as_trxid(ll_loop - 1) end select of_report_register_array "d_rpt_ap_check_reconciliation_register", ll_argseq, ls_argtyp, ls_argmnt, ll_sargseq next of_report_process "d_rpt_ap_check_reconciliation_register", true, true 'Display report of_sethourglass(False) End Sub

    Read the article

  • error C2512 in precompiled header file?

    - by SoloMael
    I'm having a ridiculously strange problem. When I try to run the program below, there's an error message that says: "error C2512: 'Record' : no appropriate default constructor available". And when I double-click it, it directs me to a precompiled read-only header file named "xmemory0". Do they expect me to change a read-only file? Here's the segment of code in the file it directs me to: void construct(_Ty *_Ptr) { // default construct object at _Ptr ::new ((void *)_Ptr) _Ty(); // directs me to this line } Here's the program: #include <iostream> #include <vector> #include <string> using namespace std; const int NG = 4; // number of scores struct Record { string name; // student name int scores[NG]; double average; // Calculate the average // when the scores are known Record(int s[], double a) { double sum = 0; for(int count = 0; count != NG; count++) { scores[count] = s[count]; sum += scores[count]; } average = a; average = sum / NG; } }; int main() { // Names of the class string names[] = {"Amy Adams", "Bob Barr", "Carla Carr", "Dan Dobbs", "Elena Evans"}; // exam scores according to each student int exams[][NG]= { {98, 87, 93, 88}, {78, 86, 82, 91}, {66, 71, 85, 94}, {72, 63, 77, 69}, {91, 83, 76, 60}}; vector<Record> records(5); return 0; }

    Read the article

  • How To Get the Name of the Current Procedure/Function in Delphi (As a String)

    - by Andreas Rejbrand
    Is it possible to obtain the name of the current procedure/function as a string, within a procedure/function? I suppose there would be some "macro" that is expanded at compile-time. My scenario is this: I have a lot of procedures that are given a record and they all need to start by checking the validity of the record, and so they pass the record to a "validator procedure". The validator procedure raises an exception if the record is invalid, and I want the message of the exception to include not the name of the validator procedure, but the name of the function/procedure that called the validator procedure (naturally). That is, I have procedure ValidateStruct(const Struct: TMyStruct; const Sender: string); begin if <StructIsInvalid> then raise Exception.Create(Sender + ': Structure is invalid.'); end; and then procedure SomeProc1(const Struct: TMyStruct); begin ValidateStruct(Struct, 'SomeProc1'); ... end; ... procedure SomeProcN(const Struct: TMyStruct); begin ValidateStruct(Struct, 'SomeProcN'); ... end; It would be somewhat less error-prone if I instead could write something like procedure SomeProc1(const Struct: TMyStruct); begin ValidateStruct(Struct, {$PROCNAME}); ... end; ... procedure SomeProcN(const Struct: TMyStruct); begin ValidateStruct(Struct, {$PROCNAME}); ... end; and then each time the compiler encounters a {$PROCNAME}, it simply replaces the "macro" with the name of the current function/procedure as a string literal.

    Read the article

  • How to solve the problem of not being informed of successful payments by the 3rd party system used b

    - by user68759
    I have a subscription based website that interacts with a 3rd party system to handle the payments. The steps to process a new subscriber registration are as follow: The subscriber enters his/her details in the subscription form and click on the submit button. Assuming the details specified are valid, a new record is created in the database to store these details. The subscriber is then redirected to the website of the 3rd party system (similar to paypal) to process the payment. Once the payment is succesful, the 3rd party website then redirect the subscriber back to our website. At this time, I know that the payment was succesful, so the record in the database is updated to indicate that payment has been made successfully. A problem that I have found occurring quite often is that if a subscriber pays but does not complete the process correctly (e.g. uses the back browser, closes the window), his/her record in the database doesn't get updated about this. Accordingly, I don't know if s/he has paid by just looking the record and need to wait for the report from the 3rd party system to find this out. How do you solve this problem? PS. One of the main reasons to store their details into the database before the payment process is done is so they can come back to complete the payment without re-entering their details again. For example, when their credit cards were rejected by the 3rd party system and they need to sort this out with their financial institution which may take a while.

    Read the article

  • Auto filling polymorphic table on save or on delete in django

    - by Mo J. Mughrabi
    Hi, Am working on an project in which I made an app "core" it will contain some of the reused models across my projects, most of those are polymorphic models (Generic content types) and will be linked to different models. Example below am trying to create audit model and will be linked to several models which may require auditing. This is the polls/models.py from django.db import models from django.contrib.auth.models import User from core.models import * from django.contrib.contenttypes import generic class Poll(models.Model): ## TODO: Document question = models.CharField(max_length=300) question_slug=models.SlugField(editable=False) start_poll_at = models.DateTimeField(null=True) end_poll_at = models.DateTimeField(null=True) is_active = models.BooleanField(default=True) audit_obj=generic.GenericRelation(Audit) def __unicode__(self): return self.question class Choice(models.Model): ## TODO: Document choice = models.CharField(max_length=200) poll=models.ForeignKey(Poll) audit_obj=generic.GenericRelation(Audit) class Vote(models.Model): ## TODO: Document choice=models.ForeignKey(Choice) Ip_Address=models.IPAddressField(editable=False) vote_at=models.DateTimeField("Vote at", editable=False) here is the core/modes.py from django.db import models from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic class Audit(models.Model): ## TODO: Document # Polymorphic model using generic relation through DJANGO content type created_at = models.DateTimeField("Created at", auto_now_add=True) created_by = models.ForeignKey(User, db_column="created_by", related_name="%(app_label)s_%(class)s_y+") updated_at = models.DateTimeField("Updated at", auto_now=True) updated_by = models.ForeignKey(User, db_column="updated_by", null=True, blank=True, related_name="%(app_label)s_%(class)s_y+") content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField(unique=True) content_object = generic.GenericForeignKey('content_type', 'object_id') and here is polls/admin.py from django.core.context_processors import request from polls.models import Poll, Choice from core.models import * from django.contrib import admin class ChoiceInline(admin.StackedInline): model = Choice extra = 3 class PollAdmin(admin.ModelAdmin): inlines = [ChoiceInline] admin.site.register(Poll, PollAdmin) Am quite new to django, what am trying to do here, insert a record in audit when a record is inserted in polls and then update that same record when a record is updated in polls.

    Read the article

  • JDBC transaction dead-lock solution required?

    - by user49767
    It's a scenario described my friend and challenged to find solution. He is using Oracle database and JDBC connection with read committed as transaction isolation level. In one of the transaction, he updates a record and executes selects statement and commits the transaction. when everything happening within single thread, things are fine. But when multiple requests are handled, dead-lock happens. Thread-A updates a record. Thread B updates another record. Thread-A issues select statement and waits for Thread-B's transaction to complete the commit operation. Thread-B issues select statement and waits for Thread-A's transaction to complete the commit operation. Now above causes dead-lock. Since they use command pattern, the base framework allows to issue commit only once (at the end of all the db operation), so they are unable to issue commit immediately after select statement. My argument was Thread-A supposed to select all the records which are committed and hence should not be issue. But he said that Thread-A will surely wait till Thread-B commits the record. is that true? What are all the ways, to avoid the above issue? is it possible to change isolation-level? (without changing underlying java framework) Little information about base framework, it is something similar to Struts action, their each and every request handled by one action, transaction begins before execution and commits after execution.

    Read the article

  • Multi threading in WCF RIA Services

    - by synergetic
    I use WCF RIA Services to update customer database. In domain service: public void UpdateCustomer(Customer customer) { this.ObjectContext.Customers.AttachAsModified(customer); syncCustomer(customer); } After update, a database trigger launches and depending on the columns updated it may insert a new record in CustomerChange table. syncCustomer(customer) method is executed to check for a new record in the CustomerChange table and if found it will create a text file which contains customer information and forwards that file to external system for import. Now this synchronization may take a time so I wanted to execute it in different thread. So: private void syncCustomer(Customer customer) { this.ObjectContext.SaveChanges(); new Thread(() => syncCustomerInfo(customer.CustomerID)) { IsBackground = true }.Start(); } private void syncCustomerInfo(int customerID) { //Thread.Sleep(2000); //does real job here ... ... } The problem is in most cases syncCustomerInfo method cannot find any new CustomerChange record even if it was definitely there. If I force thread sleep then it finds a new record. I also looked Entity Framework events but the only event provided by object context is SavingChanges which occur before changes are saved. Please suggest me what else to try.

    Read the article

  • Java: Help constructing a fillTextFields() method

    - by Holly
    I have a Java project where I am to connect to a database and create buttons (next, new, save, delete, previous) to navigate through the database content where there are appropriate text fields and labels for the specific information. I'll use the code below as an example (each button is set up very similar)... I have it as follows: JButton jbtnNext = new JButton("Next ->"); jbtnNext.addActionListener(this); if (e.getSource() == jbtnNext) jbtnNext_Click(); private void jbtnNext_Click() { JOptionPane.showMessageDialog(null, "Next" ,"Button Pressed", JOptionPane.INFORMATION_MESSAGE); try { if (rset.next()) { fillTextFields(true); }else{ //Display result in a dialog box JOptionPane.showMessageDialog(null, "Not found"); } } catch (SQLException ex) { ex.printStackTrace(); } } The professor gave the following outline of logic to construct the fillTextFields() method: Construct the method to provide reusable code that would fill the JTextFields on the GUI with appropriate values from current record from the database (when "Previous or "Next" buttons are pressed) or blank values (when the new Button is pressed). To determine when the current record was to provide values (next and previous) or the value would be blank (new button) pass a boolean argument into the method. If data from the current record was to be used as fill values, pass true for both previous and next button code after moving the record pointer. If the new button was pressed and want to fill with blank values, pass false to the method. Inside the method, use a conditional expression to evaluate the boolean variable. If true, The appropriate get----() resultset method is used to fill the JTextFields. If false, fill them with "". The .setText() method of the JTextField is used to fill each JTextField. Make sure the fillTextFields method throws the appropriate exception. I understand and have the previous and next button methods passing true, while the new button method is passing false, but I don't quite understand how to set up the fillTextFields() method correctly or how to "throw the appropriate exception"... Any help would really be appreciated, thank you!

    Read the article

< Previous Page | 58 59 60 61 62 63 64 65 66 67 68 69  | Next Page >