Search Results

Search found 1323 results on 53 pages for 'dr giles m'.

Page 15/53 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Could my iPad app be denied from the app store for using the Tapku library?

    - by Dr Dork
    I'd like to use the Tapku library to add a calander date picker control to my iPad app. I'm new to iPhone OS development and I'm still rusty on identifying the 3rd party tools and code that will get my iPad app denied from the app store. For those that have used the Tapku library, would using it in my iPad app violate any app store rules? Thanks so much in advance for your help. I'm going to continue researching this question right now.

    Read the article

  • How to disable click sound in WebBrowser Control

    - by dr. evil
    I use Javascript to click a link in the webbrowser control. But I don't want to hear IE's "click" sound. Is there anyway to do this? P.S. I don't want to change system settings. I've seen this one(http://stackoverflow.com/questions/10456/howto-disable-webbrowser-click-sound-in-your-app-only) but Document.Write is not an option for me.

    Read the article

  • PHP Comparing 2 Arrays For Existence of Value in Each

    - by Dr. DOT
    I have 2 arrays. I simply want to know if one of the values in array 1 is present in array 2. Nothing more than returning a boolean true or false Example A: $a = array('able','baker','charlie'); $b = array('zebra','yeti','xantis'); Expected result = false Example B: $a = array('able','baker','charlie'); $b = array('zebra','yeti','able','xantis'); Expected result = true So, would it be best to use array_diff() or array_search() or some other simple PHP function? Thanks!

    Read the article

  • How can I obtain the local TCP port and IP Address of my client program?

    - by Dr Dork
    Hello! I'm prepping for a simple work project and am trying to familiarize myself with the basics of socket programming in a Unix dev environment. At this point, I have some basic server side code and client side code setup to communicate. Currently, my client code successfully connects to the server code and the server code sends it a test message, then both quit out. Perfect! That's exactly what I wanted to accomplish. Now I'm playing around with the functions used to obtain info about the two environments (server and client). I'd like to obtain the local IP address and dynamically assigned TCP port of the client. The function I've found to do this is getsockname()... //setup the socket if ((sockfd = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1) { perror("client: socket"); continue; } //Retrieve the locally-bound name of the specified socket and store it in the sockaddr structure sa_len = sizeof(sa); getsock_check = getsockname(sockfd,(struct sockaddr *)&sa,(socklen_t *)&sa_len) ; if (getsock_check== -1) { perror("getsockname"); exit(1); } printf("Local IP address is: %s\n", inet_ntoa(sa.sin_addr)); printf("Local port is: %d\n", (int) ntohs(sa.sin_port)); but the output is always zero... Local IP address is: 0.0.0.0 Local port is: 0 does anyone see anything I might be or am definitely doing wrong? Thanks so much in advance for all your help!

    Read the article

  • problems with overloaded function members C++

    - by Dr Deo
    I have declared a class as class DCFrameListener : public FrameListener, public OIS::MouseListener, public OIS::KeyListener { bool keyPressed(const OIS::KeyEvent & kEvt); bool keyReleased(const OIS::KeyEvent &kEvt); //*******some code missing************************ }; But if i try defining the members like this bool DCFrameListener::keyPressed(const OIS::KeyEvent kEvt) { return true; } The compiler refuses with this error error C2511: 'bool DCFrameListener::keyPressed(const OIS::KeyEvent)' : overloaded member function not found in 'DCFrameListener' see declaration of 'DCFrameListener' Why is this happening, yet i declared the member keyPressed(const OIS::KeyEvent) in my function declaration. any help will be appreciated. Thanks

    Read the article

  • How to code a C# Extension method to turn a Domain Model object into an Interface object?

    - by Dr. Zim
    When you have a domain object that needs to display as an interface control, like a drop down list, ifwdev suggested creating an extension method to add a .ToSelectList(). The originating object is a List of objects that have properties identical to the .Text and .Value properties of the drop down list. Basically, it's a List of SelectList objects, just not of the same class name. I imagine you could use reflection to turn the domain object into an interface object. Anyone have any suggestions for C# code that could do this? The SelectList is an MVC drop down list of SelectListItem. The idea of course is to do something like this in the view: <%= Html.DropDownList("City", (IEnumerable<SelectListItem>) ViewData["Cities"].ToSelectList() )

    Read the article

  • How to read a file with variable multi-row data in Python

    - by dr.bunsen
    I have a file that is about 100Mb that looks like this: #meta data 1 skadjflaskdjfasljdfalskdjfl sdkfjhasdlkgjhsdlkjghlaskdj asdhfk #meta data 2 jflaksdjflaksjdflkjasdlfjas ldaksjflkdsajlkdfj #meta data 3 alsdkjflasdjkfglalaskdjf This file contains one row of meta data that corresponds to several, variable length data containing only alpha-numeric characters. What is the best way to read this data into a simple list like this: data = [[#meta data 1, skadjflaskdjfasljdfalskdjflsdkfjhasdlkgjhsdlkjghlaskdjasdhfk], [#meta data 2, jflaksdjflaksjdflkjasdlfjasldaksjflkdsajlkdfj], [#meta data 3, alsdkjflasdjkfglalaskdjf]] My initial idea was to use the read() method to read the whole file into memory and then use regular expressions to parse the data into the desired format. Is there a better more pythonic way? All metadata lines start with an octothorpe and all data lines are all alpha-numeric. Thanks!

    Read the article

  • What ASP.NET Web Config entries could limit certain file access by date and time?

    - by Dr. Zim
    What entries in a web.config could allow certain files to become publicly accessible after a certain date and time? Specifically, we have these files starting with AB_.jpg where the _ could be anything. We put them in a folder on April 27th for example, but they shouldn't be accessible until April 30th at 11:59:59 PM. I think the web.config in part works like Unix's FTP .htaccess file to define file security. For example, this web.config entry allows directory browsing: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <directoryBrowse enabled="true" /> </system.webServer> </configuration>

    Read the article

  • DDD: Trying to code sorting and filtering as it pertains to Poco, Repository, DTO, and DAO using C#?

    - by Dr. Zim
    I get a list of items from my Repository. Now I need to sort and filter them, which I believe would be done in the Repository for efficiency. I think there would be two ways of doing this in a DDD way: Send a filter and a sort object full of conditions to the Repository (What is this called)? Repository result would produce an object with .filter and .sort methods? (This wouldn't be a POJO/POCO because it contains more than one object?). So is the answer 1, 2, or other? Could you explain why? I am leaning toward #1 because the Repository would be able to only send the data I want (or will #2 be able to delay accessing data like a LazyList?) A code example (or website link) would be very helpful. Example: Product product = repo.GetProducts(mySortObject, myFilterObject); // List of Poco product.AddFilter("price", "lessThan", "3.99"); product.AddSort("price", "descending");

    Read the article

  • Translate from Java to C#: simple code to re-encode a string

    - by Dr. Zim
    We were sent this formula to encrypt a string written in Java: String myInput = "test1234"; MessageDigest md = MessageDigest.getInstance("SHA"); byte[] myD = md.digest(myInput.getBytes()); BASE64Encoder en64 = new BASE64Encoder(); String myOutput = new String ( Java.net.URLEncoder.encode( en64.encode(myD))); // myOutput becomes "F009U%2Bx99bVTGwS3cQdHf%2BJcpCo%3D" Our attempt at writing this in C# is: System.Security.Cryptography.SHA1 sha1 = new System.Security.Cryptography.SHA1CryptoServiceProvider(); string myOutput = HttpUtility.UrlEncode( Convert.ToBase64String( sha1.ComputeHash( ASCIIEncoding.Default.GetBytes(myInput)))); However the output is no where near the same. It doesn't even have percent signs in it. Any chance anyone would know where we are going wrong?

    Read the article

  • How can I paste an image from the clipboard into a web form?

    - by dr. squid
    I found this question, but the question is about how to get an image from the clip board into a wyziwyg editor! My question is "How can I paste an image from the clipboard into a field (what field is not that big issue as long as it works)", and then sent to the server. Jira has this functionality, so it should be possible! Any ideas on how to do this? Just to explain the complete workflow; I would like to have a plave to multi upload images, where the paste from clipboard also is an option. The upload will be some ajax of some sort, bt is not important in this context! Thanks

    Read the article

  • Using Tortoise SVN with C++ in Visual Studio 2008

    - by Dr. Monkey
    I have an online repository with some .h and .cpp files that make up part of a project. I'm trying to check these out and use them in a new project, but am getting errors (C4627 and C1010). All the files have been added to the project (with AddExisting Item...), and the subdirectories that contain these files have been added to the "Additional include directories" of the project. Would I be better off having the entire project tree in the repository? My reason for not doing so is that my colleague and I are working on different parts of the code and so want to use different main methods to test things as we go, and I didn't see any need to be passing around any compiled code etc. since I assumed that given the .h and .cpp files (with the correct settings), visual studio would be able to compile the project. What's the best way to make Visual Studio 2008 and TortoiseSVN work well together (without spending any money)?

    Read the article

  • Encapsulating user input of data for a class (C++)

    - by Dr. Monkey
    For an assignment I've made a simple C++ program that uses a superclass (Student) and two subclasses (CourseStudent and ResearchStudent) to store a list of students and print out their details, with different details shown for the two different types of students (using overriding of the display() method from Student). My question is about how the program collects input from the user of things like the student name, ID number, unit and fee information (for a course student) and research information (for research students): My implementation has the prompting for user input and the collecting of that input handled within the classes themselves. The reasoning behind this was that each class knows what kind of input it needs, so it makes sense to me to have it know how to ask for it (given an ostream through which to ask and an istream to collect the input from). My lecturer says that the prompting and input should all be handled in the main program, which seems to me somewhat messier, and would make it trickier to extend the program to handle different types of students. I am considering, as a compromise, to make a helper class that handles the prompting and collection of user input for each type of Student, which could then be called on by the main program. The advantage of this would be that the student classes don't have as much in them (so they're cleaner), but also they can be bundled with the helper classes if the input functionality is required. This also means more classes of Student could be added without having to make major changes to the main program, as long as helper classes are provided for these new classes. Also the helper class could be swapped for an alternative language version without having to make any changes to the class itself. What are the major advantages and disadvantages of the three different options for user input (fully encapsulated, helper class or in the main program)?

    Read the article

  • Scrape zipcode table for different urls based on county

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

    Read the article

  • Extend and Overload MS and Point Types

    - by dr d b karron
    Do I have make my own Point and Vector types to overload them ? Why does this not work ? namespace System . windows { public partial struct Point : IFormattable { public static Point operator * ( Point P , double D ) { Point Po = new Point ( ); return Po; } } } namespace SilverlightApplication36 { public partial class MainPage : UserControl { public static void ShrinkingRectangle ( WriteableBitmap wBM , int x1 , int y1 , int x2 , int y2 , Color C ) { wBM . DrawRectangle ( x1 , y1 , x2 , y2 , Colors . Red ); Point Center = Mean ( x1 , y1 , x2 , y2 ); wBM . SetPixel ( Center , Colors.Blue , 3 ); Point P1 = new Point ( x1 , y1 ); Point P2 = new Point ( x1 , y2 ); Point P3 = new Point ( x1 , y2 ); Point P4 = new Point ( x2 , y1 ); const int Steps = 10; for ( int i = 0 ; i < Steps ; i++ ) { double iF = (double)(i+1) / (double)Steps; double jF = ( 1.0 - iF ); Point P11 = **P1 * jF;** } }

    Read the article

  • How to save svg canvas to local filesystem

    - by dr jerry
    Is there a way to allow a user, after he has created a vector graph on a javascript svg canvas using a browser, to download this file to their local filesystem? SVG is a total new field for me so please be patient if my wording is not accurate. kind regards, Jeroen.

    Read the article

  • Help with a MySQL SELECT WHERE Clause

    - by Dr. DOT
    A column in my table contains email addresses. I have a text string that contains the a few usernames of email addresses separated by commas. I can make text sting into an array if necessary to get my SELECT WHERE clause to work correctly. Text string search argument is 'bob,sally,steve' I want to produce a WHERE clause that only returns rows where the username portion of the email address in the table matches one of the usernames in my text string search argument. Thus a row with [email protected] would not be returned but [email protected] would be. Does anyone have a WHERE clause sample that produces this result? Thanks.

    Read the article

  • How can I prevent application domain stealing?

    - by dr jerry
    I'm in the process of making a javascript application and I want to bring that online, lets call it mydesign. I'm living in the Netherlands so mydesign.nl can be mine. Now is mydesign.com available for sale by some domain broker sales bastards. And those bastards don't accept a first bid lower than 1000$ which is a about ten times of the budget I'm willing to pay. So far so good, it's a sick business model but it's there. Now lets imagine that mydesign.nl is a huge success in the Netherlands and I'm makin tons of profits out of advertisements and other things I'm not yet aware of (I know entering the lotery gives a better chance of earning money, but lets just imagine). Is there a way (licence, legal or otherwise) to prevent the sick owners of mydesign.com to download and steal my javascript app and deploy it on their own site and take the profits of my app?

    Read the article

  • How to implement an ID field on a POCO representing an Identity field in SQL Server?

    - by Dr. Zim
    If I have a Domain Model that has an ID that maps to a SQL Server identity column, what does the POCO look like that contains that field? Candidate 1: Allows anyone to set and get the ID. I don't think we want anyone setting the ID except the Repository, from the SQL table. public class Thing { public int ID {get;set;} } Candidate 2: Allows someone to set the ID upon creation, but we won't know the ID until after we create the object (factory creates a blank Thing object where ID = 0 until we persist it). How would we set the ID after persisting? public class Thing { public Thing () : This (ID: 0) {} public Thing (int ID) { this.ID = ID } private int _ID; public int ID { get { return this.ID;}; } Candidate 3: Methods to set ID? Somehow we would need to allow the Repository to set the ID without allowing the consumer to change it. Any ideas? Is this barking up the wrong tree? Do we send the object to the Repository, save it, throw it away, then create a new object from the loaded version and return that as a new object?

    Read the article

  • Is there a standard format string in ASP.NET to convert 1/2/3/... to 1st/2nd/3rd...?

    - by Dr. Monkey
    I have an integer in an Access database, which is being displayed in ASP.NET. The integer represents the position achieved by a competitor in a sporting event (1st, 2nd, 3rd, etc.), and I'd like to display it with a standard suffix like 'st', 'nd', 'rd' as appropriate, rather than just a naked number. An important limitation is that this is for an assignment which specifies that no VB or C# code be written (in fact it instructs code behind files to be deleted entirely). Ideally I'd like to use a standard format string if available, otherwise perhaps a custom string (I haven't worked with format strings much, and this isn't high enough priority to dedicate significant time to*, but I am very curious about whether there's a standard string for this). (* The assignment is due tonight, and I've learned the hard way that I can't afford to spend time on things that don't get the marks, even if they irk me significantly.)

    Read the article

  • Can I destroy a class instance even if there are still references?

    - by DR
    For debugging reasons I want to destroy a class instance which still as references. Is that possible? It doesn't have to be elegant or stable, because this'll never end up in production code. To clarify: Public Sub Main Dim o as MyClass Set o = New MyClass //o is created, one reference DestroyObject o //Class_Terminate is called and the object destroyed //Further code, not using o End Sub //Possible runtime error here (don't care) Is that possible? One way would be to call IUnknown::Release to manually decrease the reference count, but how do I now how often I must call it?

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >