Search Results

Search found 4252 results on 171 pages for 'david 85'.

Page 106/171 | < Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >

  • How can I delete from a GridView when DataSource is a DataTable?

    - by David
    My DataSource is a DataTable populated from file system data in Page_Load. There is no database. How can I remove rows from the DataTable and rebind? I thought this had to be done in the GridView_RowCommand "Delete" section... if(e.CommandName == "Delete") ... When I try to access the DataRow's within //get the datatable DataTable dt = this.gridCPCP.DataSource as DataTable; // Delete the record foreach (DataRow dr in dt.Rows) { .... dt is null. How do I reference the DataTable when deleting records?

    Read the article

  • iPhone Push Notification Reliablity

    - by David Beck
    How reliable do you find push notification on the iPhone to be? Does it improve when moving from the sandbox to production server? I am testing (with the sandbox of course) and have found that notifications are often delayed or not received at all. I am not talking about sending multiple messages and only the last one arriving, as the documentation indicates, but any notification never showing up. Also, I noticed that if I send a notification with an alert, and then send one with just a badge number, that the second notification will close the alert even after it's already opened. Does this happen between apps as well? For instance, if I send an alert for my app, and then the Facebook app sends a badge, will the Facebook badge close my alert window?

    Read the article

  • Using Constants in Perl

    - by David W.
    I am trying to define constants in Perl using the use Constant pragma: use Constant { FOO => "bar", BAR => "foo" }; I'm running into a bit of trouble, and hoping there's a standard way of handling it. First of all... I am defining a hook script for Subversion. To make things simple, I want to have a single file where the class (package) I'm using is in the same file as my actual script. Most of this package will have constants involved in it: print "This is my program"; package "MyClass"; use constant { FOO => "bar" }; sub new { yaddah, yaddah, yaddah. I would like my constant FOO to be accessible to my main program. I would like to do this without having to refer to it as MyClass::FOO. Normally, when the package is a separate file, I could do this in my main program: use MyClass qw(FOO); but, since my class and program are a single file, I can't do that. What would be the best way for my main program to be able to access my constants defined in my class? The second issue... I would like to use the constant values as hash keys: $myHash{FOO} = "bar"; The problem is that %myHash has the literal string FOO as the key and not the value of the constant. This causes problems when I do things like this: if (defined($myHash{FOO})) { print "Key " . FOO . " does exist!\n"; } I could force the context: if (defined("" . FOO . "")) { I could add parentheses: if (defined(FOO())) { Or, I could use a temporary variable: my $foo = FOO; if (defined($foo)) { None of these are really nice ways of handling this issue. So, what is the best way? Is there one way I'm missing? By the way, I don't want to use Readonly::Scalar because it is 1). slow, and 2). not part of the standard Perl package. I want to define my hook not to require additional Perl packages and to be as simple as possible to work.

    Read the article

  • Why do escape characters break my Telerik call to ResponseScripts.Add(string)?

    - by David
    this displays the expected javascript alert message box: RadAjaxManager1.ResponseScripts.Add("alert('blahblahblah');"); while these does not: RadAjaxManager1.ResponseScripts.Add("alert('blahblah \n blahblahblah');"); RadAjaxManager1.ResponseScripts.Add("alert('blahblah \r blahblahblah');"); RadAjaxManager1.ResponseScripts.Add("alert('blahblah \r\n blahblahblah');"); RadAjaxManager1.ResponseScripts.Add("alert('blahblah \n\t blahblahblah');"); RadAjaxManager1.ResponseScripts.Add(@"alert('blahblah \n blahblahblah');"); string message = "blahblahblah \n blahblahblah"; RadAjaxManager1.ResponseScripts.Add(message); I can't find any documentation on escape characters breaking this. I understand the single string argument to the Add method can be any script. No error is thrown, so my best guess is malformed javascript.

    Read the article

  • How to use a proprety/value table in MySQL

    - by David
    I inherited a mysql database that has a table with columns like this: object_id, property, value It holds data like this: 1,first_name,Jane 1,last_name,Doe 1,age,10 1,color,red 2,first_name,Mike 2,last_name,Smith 2,age,20 2,color,blue 3,first_name,John 3,last_name,Doe 3,age,20 3,color,red ... Basically what I want to do is treat this table as a regular table. How would I get the id numbers (or all properties) of a person who is age 20 sorted by last and than first name? So far I have: SELECT object_id FROM table WHERE property = 'age' AND value = '20' union SELECT object_id FROM table WHERE property = 'color' AND value = 'red' But I'm not sure how to go about ordering the data. Thanks

    Read the article

  • Hide Column based up Paramater Selected SSRS

    - by David A
    I would like to set the visiblity of columns based upon the value selected in a paramater. The problem is I do not want a specific paramater to do this (i.e Hide column X True/False) My report has several diffrent "departments" who are only intrested in certain columns. What would be the syntax for example to hide the "Sales" column when the "Customer Care" paramater is set?

    Read the article

  • translate ia32 into C

    - by David Lee
    I am trying to translate the following: Action: push %ebp #function prolog mov %esp, %ebp sub $0x10, %esp mov 0x8(%ebp), %eax #first line compiles to these 4 lines imul 0x8(%ebp), %eax sub $0x7, %eax mov %eax, -0x4(%ebp) addl $0x8, 0xc(%ebp) #second line mov -0x4(%ebp), %eax #third line mov 0xc(%ebp), %edx mov (%edx, %eax, 4), %eax add $0x3, %eax movb $0x41, (%eax) leave ret So far I have the following: //What am I missing? void Action(int x, char **y) { int z = x * x - 7; y+=8; //missing third line } What is the best way to translate this?

    Read the article

  • Blogger Template not saving after Facebook like changes

    - by David Shellabarger
    I've add the facebook Like button to http://www.goldfishview.com/ and that works great. Its powered by Blogger. Now I want to move it to the end of my posts instead of a the beginning. I move the facebook iframe and the preview looks great, but once I save the template it reverts back to were it was. I've tried in Chrome and Firefox. In Chrome after I click preview the save template button becomes useless and doesn't do anything when I click on it. In Firefox everything looks like it takes, but on page refresh the iFrame goes back to its original position. Am I crazy?

    Read the article

  • Weird camera Intent behavior

    - by David Erosa
    Hi all. I'm invoking the MediaStore.ACTION_IMAGE_CAPTURE intent with the MediaStore.EXTRA_OUTPUT extra so that it does save the image to that file. On the onActivityResult I can check that the image is being saved in the intended file, which is correct. The weird thing is that anyhow, the image is also saved in a file named something like "/sdcard/Pictures/Camera/1298041488657.jpg" (epoch time in which the image was taken). I've checked the Camera app source (froyo-release branch) and I'm almost sure that the code path is correct and wouldn't have to save the image, but I'm a noob and I'm not completly sure. AFAIK, the image saving process starts with this callback (comments are mine): private final class JpegPictureCallback implements PictureCallback { ... public void onPictureTaken(...){ ... // This is where the image is passed back to the invoking activity. mImageCapture.storeImage(jpegData, camera, mLocation); ... public void storeImage(final byte[] data, android.hardware.Camera camera, Location loc) { if (!mIsImageCaptureIntent) { // Am i an intent? int degree = storeImage(data, loc); // THIS SHOULD NOT BE CALLED WITHIN THE CAPTURE INTENT!! ....... // An finally: private int storeImage(byte[] data, Location loc) { try { long dateTaken = System.currentTimeMillis(); String title = createName(dateTaken); String filename = title + ".jpg"; // Eureka, timestamp filename! ... So, I'm receiving the correct data, but it's also being saved in the "storeImage(data, loc);" method call, which should not be called... It'd not be a problem if I could get the newly created filename from the intent result data, but I can't. When I found this out, I found about 20 image files from my tests that I didn't know were on my sdcard :) I'm getting this behavior both with my Nexus One with Froyo and my Huawei U8110 with Eclair. Could please anyone enlight me? Thanks a lot.

    Read the article

  • Creating A Single Threaded Server with AnyEvent (Perl)

    - by David Williams
    I'm working on creating a local service to listen on localhost and provide a basic call and response type interface. What I'd like to start with is a baby server that you can connect to over telnet and echoes what it receives. I've heard AnyEvent is great for this, but the documentation for AnyEvent::Socket does not give a very good example how to do this. I'd like to build this with AnyEvent, AnyEvent::Socket and AnyEvent::Handle. Right now the little server code looks like this: #!/usr/bin/env perl use AnyEvent; use AnyEvent::Handle; use AnyEvent::Socket; my $cv = AnyEvent->condvar; my $host = '127.0.0.1'; my $port = 44244; tcp_server($host, $port, sub { my($fh) = @_; my $cv = AnyEvent->condvar; my $handle; $handle = AnyEvent::Handle->new( fh => $fh, poll => "r", on_read => sub { my($self) = @_; print "Received: " . $self->rbuf . "\n"; $cv->send; } ); $cv->recv; }); print "Listening on $host\n"; $cv->wait; This doesn't work and also if I telnet to localhost:44244 I get this: EV: error in callback (ignoring): AnyEvent::CondVar: recursive blocking wait attempted at server.pl line 29. I think if I understand how to make a mini, single threaded server that simply prints out whatever its given and then waits for more input, I could take it a lot further from there. Any ideas?

    Read the article

  • Incongruity between Eclipse Outline/Package perspective and source code being displayed - Java error generated at runtime

    - by David Daedalus
    I've been debugging a Java application and have encountered something odd. When a particular method is called, Java throws a ClassNotFoundException. Unfortunately, the methods in question (the invoking and the 'missing' one) are inside a JAR file for which I have no documentation or source. To get at the source, I used JD-GUI (a Java JAR reverse engineer-er) and the JD plugin for Eclipse. As far as I can tell, the class in question exists inside the JAR file. This because JD-GUI displays it inside the JAR, and from within Eclipse I can see it listed along with the constructors and methods. My question is why the source being displayed in Eclipse is for a different class (that also exists)? This program was built with Ant - is it possible the problem lies there? Screenshot below for your viewing pleasure - and thanks in advance for your help!

    Read the article

  • video tag in iphone status

    - by David
    Is there any movie that actually works in iPhone/iPad safari using the video tag? We tried so many formats and code snippets. I've heard that mp4/h264 should work, but not for us. Can anyone point me to a working example online? If you know the code or specs/formats for the videotag on iphone, that would be great.

    Read the article

  • Linenumber for Exception thrown in runtime-compiled DotNET code

    - by David Rutten
    Not quite the same as this thread, but pretty close. My program allows people to enter some VB or C# code which gets compiled, loaded and executed at runtime. My CompilerParams are: CompilerParameters params = new CompilerParameters(); params.GenerateExecutable = false; params.GenerateInMemory = true; params.IncludeDebugInformation = false; params.TreatWarningsAsErrors = false; params.WarningLevel = 4; When this code throws an exception I'd like to be able to display a message box that helps users debug their code. The exception message is easy, but the line-number is where I got stuck. I suspect that in order to get at the line number, I may need to drastically change the CompilerParameters and perhaps even the way these dlls get stored/loaded. Does anyone know the least steps needed to get this to work?

    Read the article

  • In .NET, how do I prevent, or handle, tampering with form data of disabled fields before submission?

    - by David
    Hi, If a disabled drop-down list is dynamically rendered to the page, it is still possible to use Firebug, or another tool, to tamper with the submitted value, and to remove the "disabled" HTML attribute. This code: protected override void OnLoad(EventArgs e) { var ddlTest = new DropDownList() {ID="ddlTest", Enabled = false}; ddlTest.Items.AddRange(new [] { new ListItem("Please select", ""), new ListItem("test 1", "1"), new ListItem("test 2", "2") }); Controls.Add(ddlTest); } results in this HTML being rendered: <select disabled="disabled" id="Properties_ddlTest" name="Properties$ddlTest"> <option value="" selected="selected">Please select</option> <option value="1">test 1</option> <option value="2">test 2</option> </select> The problem occurs when I use Firebug to remove the "disabled" attribute, and to change the selected option. On submission of the form, and re-creation of the field, the newly generated control has the correct value by the end of OnLoad, but by OnPreRender, it has assumed the identity of the submitted control and has been given the submitted form value. .NET seems to have no way of detecting the fact that the field was originally created in a disabled state and that the submitted value was faked. This is understandable, as there could be legitimate, client-side functionality that would allow the disabled attribute to be removed. Is there some way, other than a brute force approach, of detecting that this field's value should not have been changed? I see the brute force approach as being something crap, like saving the correct value somewhere while still in OnLoad, and restoring the value in the OnPreRender. As some fields have dependencies on others, that would be unacceptable to me.

    Read the article

  • Optional attribute values in MappedField

    - by David Brooks
    I'm new to Scala and Lift, coming from a slightly odd background in PLT Scheme. I've done a quick search on this topic and found lots of questions but no answers. I'm probably looking in the wrong place. I've been working my way through tutorials on using Mapper to create database-backed objects, and I've hit a stumbling block: what types should be used to stored optional attribute values. For example, a simple ToDo object might comprise a title and an optional deadline (e.g. http://rememberthemilk.com). The former would be a MappedString, but the latter could not be a MappedDateTime since the type constraints on the field require, say, defaultValue to return a Date (rather than a Date or null/false/???). Is an underlying NULL handled by the MappedField subclasses? Or are there optional equivalents to things like MappedInt, MappedString, MappedDateTime that allow the value to be NULL in the database? Or am I approaching this in the wrong way?

    Read the article

  • Moving a Point along a Path in SQL Server 2008

    - by David Pfeffer
    I have a geography field stored in my database, holding a linestring path. I want to move a point n meters along this linestring, and return the destination. For example, I want the destination point 500 meters along the linestring starting from its beginning. Here's an example -- what is the YourFunctionHere? Or, is there another way? DECLARE @g geography; SET @g = geography::STGeomFromText('LINESTRING(-122.360 47.656, -122.343 47.656, -122.310 47.690)', 4326); SELECT @g.YourFunctionHere(100).ToString();

    Read the article

  • Can this jQuery code snippet be shortened?

    - by David Vidmar
    I have just stared using jQuery and although following code gets the job done, I have a feeling that it can be shortened. var accountAddress = $(document.createElement("input")).addClass("readOnly").attr("contentEditable", "false").attr("id", "d_accountAddress"); $("#customerid_c").next().next().next().append(accountAddress); If it is not clear - what I'm doing is creating new input tag, assigning class and making it readonly, then positioning new input two TD's to the right of some known text.

    Read the article

  • Aggregate Functions and Group By Problems

    - by David Stein
    If we start with the following simple SQL statement which works. SELECT sor.FPARTNO, sum(sor.FUNETPRICE) FROM sorels sor GROUP BY sor.FPARTNO FPartNo is the part number and the Funetprice is obviously the net price. The user also wants the description and this causes a problem. If I follow up with this: SELECT sor.FPARTNO, sor.fdesc, sum(sor.FUNETPRICE) FROM sorels sor GROUP BY sor.FPARTNO, sor.fdesc If there are multiple variations of the description for that part number, typically very small variations in the text, then I don't actually aggregate on the part number. Make sense? I'm sure this must be simple. How can I return the first fdesc that corresponds to the part number? Any of the description variations would suffice as they are almost entirely identical. Edit: The description is a text field.

    Read the article

  • How do I debug a difficult-to-reproduce crash with no useful call stack?

    - by David M
    I am encountering an odd crash in our software and I'm having a lot of trouble debugging it, and so I am seeking SO's advice on how to tackle it. The crash is an access violation reading a NULL pointer: First chance exception at $00CF0041. Exception class $C0000005 with message 'access violation at 0x00cf0041: read of address 0x00000000'. It only happens 'sometimes' - I haven't managed to figure out any rhyme or reason, yet, for when - and only in the main thread. When it occurs, the call stack contains one incorrect entry: For the main thread, which this is, it should show a large stack full of other items. At this point, all other threads are inactive (mostly sitting in WaitForSingleObject or a similar function.) I have only seen this crash occur in the main thread. It always has the same call stack of one entry, in the same method at the same address. This method may or may not be related - we do use the VCL in our application. My bet, though, is that something (possibly quite a while ago) is corrupting the stack, and the address where it's crashing is effectively random. Note it has been the same address across several builds, though - it's probably not truly random. Here is what I've tried: Trying to reproduce it reliably at a certain point. I have found nothing that reproduces it every time, and a couple of things that occasionally do, or do not, for no apparent reason. These are not 'narrow' enough actions to narrow it down to a particular section of code. It may be timing related, but at the point the IDE breaks in, other threads are usually doing nothing. I can't rule out a threading problem, but think it's unlikely. Building with extra debugging statements (extra debug info, extra asserts, etc.) After doing so, the crash never occurs. Building with Codeguard enabled. After doing so, the crash never occurs and Codeguard shows no errors. My questions: 1. How do I find what code caused the crash? How do I do the equivalent of walking back up the stack? 2. What general advice do you have for how to trace the cause of this crash? I am using Embarcadero RAD Studio 2010 (the project mostly contains C++ Builder code and small amounts of Delphi.)

    Read the article

  • A smoother alternative to jQuery show() and hide()

    - by David B
    I have a page setup with a hidden column using the jQuery show() and hide() functions to slide the column in and out. However it's kind of "clunky" and does not look very smooth when showing/hiding; in contrast I also have a section of the page using jquery UI accordion. When switching between these sections the transition looks very nice and smooth... Is there a better function than show()/hide() which looks as nice as the accordion does? (maybe the "easing" parameter can be used in the show/hide functions, but i'm not sure how to use this properly?)

    Read the article

  • Logic for family tree program

    - by david robers
    Hi All, I am creating a family tree program in Java, or at least trying to. I have developed several classes: Person - getters and setter for name gender age etc FamilyMember - extends Person getters and setters for setting arents and children Family - which consists of multiple family members and methods for adding removing members FamilyTree which is the main class for setting relationships. I have two main problems: 1) I need to set the relationships between people. Currently I am doing: FamilyMember A, FamilyMember B B.setMother(A); A.setChild(B); The example above is for setting a mother child relationship. This seems very clunky. Its getting very long winded to implement all relationships. Any ideas on how to implement multiple relationships in a less prodcedural way? 2) I have to be able to display the family tree. How can I do this? Are there any custom classes out there to make life easier? Thanks for your time...

    Read the article

  • Serialization of non-required fields in protobuf-net

    - by David Hedlund
    I have a working java client that is communicating with Google, through ProtoBuf serialized messages. I am currently trying to translate that client into C#. I have a .proto file where the parameter appId is an optional string. Its default value in the C# representation as generated by the protobuf-net library is an empty string, just as it is in the java representation of the same file. message AppsRequest { optional AppType appType = 1; optional string query = 2; optional string categoryId = 3; optional string appId = 4; optional bool withExtendedInfo = 6; } I find that when I explicitly set appId to "" in the java client, the client stops working (403 Bad Request from Google). When I explicitly set appId to null in the java client, everything works, but only because hasAppId is being set to false (I'm uncertain as to how that affects the serialization). In the C# client, I always get 403 responses. I don't see any logic behind the distinction between not setting a value, and setting the default value, that seems to make all the difference in the java client. Since the output is always a binary stream, I am not sure if the successful java messages are being serialized with an empty string, or not serialized at all. In the C# client, I've tried setting IsRequired to true on the ProtoMember attribute, to force them to serialize, and I've tried setting the default value to null, and explicitly set "", so I'm quite sure I've tried some configuration where the value is being serialized. I've also played around with ProtoBuf.ProtoIgnore and at some point, removing the appId parameter altogether, but I haven't been able to avoid the 403 errors in C#. I've tried manually copying the serialized string from java, and that resolved my issues, so I'm certain that the rest of the HTTP Request is working, and the error can be traced to the serialized object. My serialization is simply this: var clone = ProtoBuf.Serializer.DeepClone(request); MemoryStream ms = new MemoryStream(2000); ProtoBuf.Serializer.Serialize(ms, clone); var bytearr = ms.ToArray(); string encodedData = Convert.ToBase64String(bytearr); I'll admit to not being quite sure about what DeepClone does. I've tried both with and without it...

    Read the article

  • Good tools for keeping the content in test/staging/live environments synchronized

    - by David Stratton
    I'm looking for recommendations on automated folder synchronization tools to keep the content in our three environments synchronized automatically. Specifically, we have several applications where a user can upload content (via a File Upload page or a similar mechanism), such as images, pdf files, word documents, etc. In the past, we had the user doing this to our live server, and as a result, our test and staging servers had to be manually synchronized. Going forward, we will have them upload content to the staging server, and we would like some software to automatically copy the files off to the test and live servers EITHER on a scheduled basis OR as the files get uploaded. I was planning on writing my own component, and either set it up as a scheduled task, or use a FileSystemWatcher, but it occurred to me that this has probably already been done, and I might be better off with some sort of synchronization tool that already exists. On our web site, there are a limited number of folders that we want to keep synchronized. In these folders, it is an all or nothing - we want to make sure the folders are EXACT duplicates. This should make it fairly straightforward, and I would think that any software that can synchronize folders would be OK, except that we also would like the software to log changes. (This rules out simple BATCH files.) So I'm curious, if you have a similar environment, how did you solve the challenge of keeping everything synchronized. Are you aware of a tool that is reliable, and will meet our needs? If not, do you have a recommendation for something that will come close, or better yet, an open source solution where we can get the code and modify it as needed? (preferably .NET). Added Also, I DID google this first, but there are so many options, I am interested mostly in knowing what actually works well vs what they SAY works, which is why I'm asking here.

    Read the article

  • Silverlight 4 business application themes

    - by David Brunelle
    Hi, We are starting a new SilverLight 4 Business Application project and are looking for theme. All we can find on the web are Navigation Application themes, which when applied to business application project, don't work. Most even have compilation errors. Is there a place on the web to get theme specifically for that project or is there a way to translate navigation application theme into business application theme? Thank you

    Read the article

< Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >