Search Results

Search found 217 results on 9 pages for 'glenn curtis'.

Page 6/9 | < Previous Page | 2 3 4 5 6 7 8 9  | Next Page >

  • How can I create and use a web service in public but still restrict its use to only my app?

    - by Glenn
    I'm creating a web service with create/update/delete calls. But for now I'd like to restrict use of it on my own web app and no other clients. How can I have clear text javascript code that makes these calls but still be confident the credentials won't be used elsewhere? My idea is to use server side generated nonces for each request. But I am open to different ideas you guys may have. Thanks.

    Read the article

  • mysql insert multiple rows, return rows that failed

    - by Glenn
    When I try to insert (lets say) 30 rows in my table. For example INSERT INTO customers(cust_name, cust_address, cust_city, cust_state, cust_zip, cust_country) VALUES( 'Pep E. LaPew', '100 Main Street', 'Los Angeles', 'CA', '90046', 'USA' ), ( 'M. Martian', '42 Galaxy Way', 'New York', 'NY', '11213', 'USA' ), ... ; And cust_name has to be unique. How can I then identify the records that failed to insert because their cust_name already exists? Is it possible to return them?

    Read the article

  • Porting WebSphere code to get remote credentials to Tomcat

    - by Glenn Lawrence
    I have been asked to look into porting some code from a web app under IBM WAS 7 so that it will run under Tomcat 7. This is part of a larger SPNEGO/Kerberos SSO system but for purposes of discussion I have distilled the code down to the following that shows the dependencies on the two WebSphere classes AccessController and WSSubject: GSSCredential clientCreds = (GSSCredential) com.ibm.ws.security.util.AccessController.doPrivileged(new java.security.PrivilegedAction() { public Object run() { javax.security.auth.Subject subject = com.ibm.websphere.security.auth.WSSubject.getCallerSubject(); GSSCredential clientCreds = (GSSCredential) subject.getPrivateCredentials(GSSCredential.class).iterator().next(); return clientCreds; } }); I'd like to be able to do this in Tomcat.

    Read the article

  • Is there a design pattern for injecting methods into a class?

    - by glenn I.
    I have a set of classes that work together (I'm coding in javascript). There is one parent class and a number of child classes that are instantiated by the parent class. I have a number of clients of these classes that each need to add on one more methods to the parent or child classes. Rather than having each client inherit from these classes, which is doable but messy because of the child classes, I am having these clients pass functions into the parent class when they instantiate the main class. The main class creates the methods dynamically and the clients can call the methods like they were there all along. My questions are: is this a sensible thing to do? what would the design pattern be for what I am doing?

    Read the article

  • Storing datetime in database?

    - by Curtis White
    I'm working on a blog and want to show my posts in eastern time zone. i figured that storing everything UTC would be the proper way. This creates a few challenges though: I have to convert all times from UTC to Eastern. This is not a biggie but adds a lot of code. And the "biggie" is that I use a short-date time to reference the posts by passing in a query, ala blogger. The problem is that there is no way to convert the short date time to the proper UTC date because I'm lacking the posted time info. Hmm, any problem to just storing all dates in eastern time? This would certainly make it easier for the rest of the application but if I needed to change time zones everything would be stored wrong.

    Read the article

  • concatenating results from SQL query and NULL columns

    - by Curtis
    I need to concatenate several columns of a table into a single value, then show that value in an asp dropdownlist. The SQL code I'm issuing is as follows: SELECT UserID, CustomerNum, UserName + ' - ' + UserAddress + ',' + UserCity + ' ' + UserState AS UserInfo FROM Users WHERE (CustomerNum = @CustomerNum) ORDER BY UserName I then set 'UserInfo' as the text field in the dropdownlist. This generally works, except occasionally one of the columns in the database is null (for example, UserState). When that happens, the entire concatenation is null, and I get an empty entry in the dropdownlist. Is there something in SQLServer that will allow me to ignore those NULL results, or will I have to code something up in the DataBind event? Thanks

    Read the article

  • event listener says NetStream.Play.Start but I see no video

    - by Curtis
    I'm trying to test out the Adobe Media Server, and I'm following some tutorials in order to stream a video. I have a NetConnection which successfully connects to the application on the server, then I have the code below. It looks like it's supposed to play a video, but it doesn't. It creates the video object as a black square in the top left corner, and the event.info.code says NetStream.Play.Start, but I don't see the video playing. case "NetConnection.Connect.Success": var v:Video = new Video(); v.width=200; v.height=200; v.x=0; v.y=0; v.visible=true; v.opaqueBackground=false; stage.addChild(v); var ns:NetStream = new NetStream(nc); ns.addEventListener(NetStatusEvent.NET_STATUS,netStatusHandler); v.attachNetStream(ns); ns.play("mp4:polymorphics.f4v"); I can also try ns.play("rtmp://localhost/vod/mp4:tests/polymorphics.f4v"); but that gives me a Stream Not Found error The lines that begin with "ns" means that they're generated by my NetStream listener, as opposed to my NetConnection listener. Connecting... connected is: true event.info.level: status event.info.code: NetConnection.Connect.Success onReply recieved value: Hello, World! ns connected is: true ns event.info.level: status ns event.info.code: NetStream.Play.Reset ns connected is: true ns event.info.level: status ns event.info.code: NetStream.Play.Start

    Read the article

  • In SQL Server what is most efficient way to compare records to other records for duplicates with in

    - by Glenn
    We have an SQL Server that gets daily imports of data files from clients. This data is interrelated and we are always scrubbing it and having to look for suspect duplicate records between these files. Finding and tagging suspect records can get pretty complicated. We use logic that requires some field values to be the same, allows some field values to differ, and allows a range to be specified for how different certain field values can be. The only way we've found to do it is by using a cursor based process, and it places a heavy burden on the database. So I wanted to ask if there's a more efficient way to do this. I've heard it said that there's almost always a more efficient way to replace cursors with clever JOINS. But I have to admit I'm having a lot of trouble with this one. For a concrete example suppose we have 1 table, an "orders" table, with the following 6 fields. order_id, customer_id product_id, quantity, sale_date, price We want to look through the records to find suspect duplicates on the following example criteria. These get increasingly harder. 1. Records that have the same product_id, sale_date, and quantity but different customer_id's should be marked as suspect duplicates for review. 2. Records that have the same customer_id, product_id, quantity and have sale_dates within five days of each other should be marked as suspect duplicates for review 3. Records that have the same customer_id, product_id, but different quantities within 20 units, and sales dates within five days of each other should be considered suspect. Is it possible to satisfy each one of these criteria with a single SQL Query that uses JOINS? Is this the most efficient way to do this?

    Read the article

  • sending +-200 emails using php mail() function in a loop

    - by Glenn
    Note: It is worth noting that the mail() function is not suitable for larger volumes of email in a loop. This function opens and closes an SMTP socket for each email, which is not very efficient. Source: PHP manual What are larger volumes? A 100 or a 1000?? Can I safely make it loop 200 times without much problems? (I can't install pear)

    Read the article

  • What are the correct steps to capture data with uploadify?

    - by Curtis
    Does anyone have a demo of using uploadify with additional fields and saving to database? The site's examples don't explain the process in depth and I am not familiar with jquery. I don't know why but I can't get my head around how too integrate the two. I have the demo working and I have my app which uses traditional php/html forms working. I need to conduct basic form collection with uploadify in the mix. Collect data and check data with feedback and then process into database and post back a confirmation. How do I feed information back to the uploadify form if there is a problem from the upload.php file? How do I access my data in the upload.php file? how do I redirect the upload page to a confirmation page after a succeeful upload?

    Read the article

  • Dynamic query to immediate execute?

    - by Curtis White
    I am using the MSDN Dynamic linq to sql package. It allows using strings for queries. But, the returned type is an IQueryable and not an IQueryable<T>. I do not have the ToList() method. How can I this immediate execute without manually enumerating over the IQueryable? My goal is to databind to the Selecting event on a linqtosql datasource and that throws a datacontext disposed exception. I can set the query as the Datasource on a gridview though. Any help greatly appreciated! Thanks. The dynamic linq to sql is the one from the samples that comes with visual studio.

    Read the article

  • How do you prove a function works?

    - by glenn I.
    I've recently gotten the testing religion and have started primarily with unit testing. I code unit tests which illustrate that a function works under certain cases, specifically using the exact inputs I'm using. I may do a number of unit tests to exercise the function. Still, I haven't actually proved anything other than the function does what I expect it to do under the scenarios I've tested. There may be other inputs and scenarios I haven't thought of and thinking of edge cases is expensive, particularly on the margins. This is all not very satisfying to do me. When I start to think of having to come up with tests to satisfy branch and path coverage and then integration testing, the prospective permutations can become a little maddening. So, my question is, how can one prove (in the same vein of proving a theorem in mathematics) that a function works (and, in a perfect world, compose these 'proofs' into a proof that a system works)? Is there a certain area of testing that covers an approach where you seek to prove a system works by proving that all of its functions work? Does anybody outside of academia bother with an approach like this? Are there tools and techniques to help? I realize that my use of the word 'work' is not precise. I guess I mean that a function works when it does what some spec (written or implied) states that it should do and does nothing other than that. Note, I'm not a mathematician, just a programmer.

    Read the article

  • MSDN firefox examples?

    - by Curtis White
    When I go to these examples using Firefox 3.6.3 and click the code examples it doesn't work: http://msdn.microsoft.com/en-us/library/1whwt1k7.aspx I want confirmation that this is a Firefox compatibility problem, suspect my firewall.f

    Read the article

  • LINQ to SQl updating primary key field?

    - by Curtis White
    I have a linq to sql table/class that uses a GUID as both a primary key and as foreign key. This problem came up when factoring some code that previously worked. The exception generated is "Operation is not valid due to the current state of the object." The process I use is as such: aspnet_User user() = new aspnet_User(); aspnet_user.childTable = new childTable(); .. set some properties user.Insert() -> my custom method ... @ my custom method using (mycontext dc = new context() ) { user.childTable.ID = (Guid)myNewlyCreatedGuid; } The exception occurs on the assignment childTable.set_UserId().

    Read the article

  • How do you mentally handle going from writing managed to non-managed code?

    - by Glenn Sandoval
    ~80% of the code I write is in C#. The other ~20% is in C++. Whenever I have to switch from C# to C++, it takes me quite a while to mentally "shift gears" to thinking in C++. I make simple mistakes using pointers and memory allocation that I would not have made when I was in university. Is this normal? Does anyone else experience something similar and if so, what do you do to cut down on the time this wastes?

    Read the article

  • DataReader is not returning results from a MySQL Stored Proc

    - by Glenn Slaven
    I have a stored proc in MySQL (5.5) that I'm calling from a C# application (using MySQL.Data v6.4.4.0). I have a bunch of other procs that work fine, but this is not returning any results, the data reader says the result set is empty. The proc does a couple of inserts & an update inside a transaction then selects 2 local variables to return. The inserts & update are happening, but the select is not returning. When I run the proc manually it works, gives a single row with the two fields, but the data reader is empty. This is the proc: CREATE DEFINER=`root`@`localhost` PROCEDURE `File_UpdateFile`(IN siteId INT, IN fileId INT, IN description VARCHAR(100), IN folderId INT, IN fileSize INT, IN filePath VARCHAR(100), IN userId INT) BEGIN START TRANSACTION; SELECT MAX(v.versionNumber) + 1 INTO @versionNumber FROM `file_version` v JOIN `file` f ON (v.fileId = f.fileId) WHERE v.fileId = fileId AND f.siteId = siteId; INSERT INTO `file_version` (fileId, versionNumber, description, fileSize, filePath, uploadedOn, uploadedBy, fileVersionState) VALUES (fileId, @versionNumber, description, fileSize, filePath, NOW(), userId, 0); INSERT INTO filehistory (fileId, `action`, userId, createdOn) VALUES (fileId, 'UPDATE', userId, NOW()); UPDATE `file` f SET f.checkedOutBy = NULL WHERE f.fileId = fileId; COMMIT; SELECT fileId, @versionNumber `versionNumber`; END$$ I'm calling the proc using Dapper, but I've debugged into the SqlMapper class and I can see that the reader is not returning anything.

    Read the article

  • What prevents a user from adding controls to an ASP.NET page client side?

    - by Curtis White
    This goes back to my other question which I thought was sufficiently answers but upon reflect am not sure that it was (sorry). Backgrounder: I am generating a form dynamically. I am pulling from the database the controls. I must associate each control with a database ID which is not the user's session id. I do this currently by storing my ID in the ID for the web control with some other stuff to make it unique/clear what I am doing. On the post back, I iterate through all the controls on my web page checking for my special identifier, ie, MyGeneratedTextBox_ID_Unique. This process enables for 2 important steps, identifying the control was one I generated and also getting the ID for this input field. And, all of this works but I'm still concerned about the security of it. I do not see a security issue with showing the actual database ID's in this case, although agree it is not desirable. However, I am concerned of the following possibilities: If a user could add a nefarious control to my collection and use that for a SQL injection attack. More academic, but if a user could somehow store data for fields they do not have access too by changing the id's. I agree this is a "hack" of a way to do it. But my question is, is it a security risk and is there an 'easy' way to do it in a less hack way? I assume that only the controls that are created/instantiated on the page are added to the controls list.. thus all controls must be created server side and thus the security issue is address but just wanted to validate. Thanks again. PS: I could see adding a property for each control and encrypting the viewstate would be a little more secure.

    Read the article

  • windows mobile - connection link failed

    - by Glenn
    Windows mobile 6.1 device, attempting to connect via a mobile network and we sometime see the message "Connection Link failed". Can anyone verify what this actually means, I'm beginning to think it relates to signal from the mobile carrier but does anyone have any other ideas?

    Read the article

  • Secure to store an ID in an ASP.NET control ID?

    - by Curtis White
    I'm auto-generating a form in my ASP.NET page. This is already tested and working. I want to know if: If there are any security problems with storing the database ID as part of my controls ID? I can see think of 2 issues: the id will be visible in page source (not really important in this case), and the possibility someone could change the name of the control somehow? This second possibility is more serious. Is this a potential problem and how to void it? If there would be a better preferred way to associate a unique data with any type of control? Is it possible to store a custom item in the viewstate for the control?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9  | Next Page >