Daily Archives

Articles indexed Friday May 7 2010

Page 12/110 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Encrypt php code

    - by riad
    Hi all, I create a software using php. Now need to sale this software .So, I need to encrypt my code that nobody can view my source code. can anybody help me to do: 1. Encrypt my PHP code but software functioning will remaining same. 2. Also I need to bind the software for a particular authorized pc & it will not run any other pc except my authentication. How can I do that? encrypt using LAN MAC address? or any other idea? pls help!

    Read the article

  • Can I load a UIImage from a URL?

    - by progrmr
    I have a URL for an image (got it from UIImagePickerController) but I no longer have the image in memory (the URL was saved from a previous run of the app). Can I reload the UIImage from the URL again? I see that UIImage has a imageWithContentsOfFile: but I have a URL. Can I use NSData's dataWithContentsOfURL: to read the URL? EDIT based on @Daniel's answer I tried the following code but it doesn't work... NSLog(@"%s %@", __PRETTY_FUNCTION__, photoURL); if (photoURL) { NSURL* aURL = [NSURL URLWithString:photoURL]; NSData* data = [[NSData alloc] initWithContentsOfURL:aURL]; self.photoImage = [UIImage imageWithData:data]; [data release]; } When I ran it the console shows: -[PhotoBox willMoveToWindow:] file://localhost/Users/gary/Library/Application%20Support/iPhone%20Simulator/3.2/Media/DCIM/100APPLE/IMG_0004.JPG *** -[NSURL length]: unrecognized selector sent to instance 0x536fbe0 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL length]: unrecognized selector sent to instance 0x536fbe0' Looking at the call stack, I'm calling URLWithString, which calls URLWithString:relativeToURL:, then initWithString:relativeToURL:, then _CFStringIsLegalURLString, then CFStringGetLength, then forwarding_prep_0, then forwarding, then -[NSObject doesNotRecognizeSelector]. Any ideas why my NSString (photoURL's address is 0x536fbe0) doesn't respond to length? Why does it say it doesn't respond to -[NSURL length]? Doesn't it know that param is an NSString, not a NSURL?

    Read the article

  • How do I prove to a client/advertiser that my site's analytics numbers are what I say they are?

    - by Bryson
    I have been asked to provide recommendations on "Verified Analytics" for the next iteration of my company's site. Verified to mean that when we sell ad space, it's based on a number of page-views, and the people who buy that space want a way to verify that the numbers we give them are the actual numbers we're delivering. I have turned to The Google and the only services I can find for this sort of thing revolve around Google Analytics and the sale of a domain name. I export my analytics numbers to a PDF, have Google email the PDF to my auctioneer, and they look for signs of tampering. If no signs of tampering are found they put a little "Verified" badge on the domain auction. (Here) Other than this, and something similar on another domain sales site, I haven't found anything like what I've been asked to find. Currently we are using Google Analytics, however I've been also asked to recommend a replacement for that based on the ability to be verified. I'd rather just stick with Google Analytics since we also use Google for advertising.

    Read the article

  • Windows 7 theme for WPF?

    - by DanM
    Is there any way to make a WPF app look like it's running on Windows 7 even if it's running on XP? I'm looking for some kind of theme I can just paste in. I'm aware of the themes project on Codeplex (http://www.codeplex.com/wpfthemes), but it lacks support for DataGrid, which is something I critically need. I was thinking maybe the Windows 7 theme would just be an easy port, or exists in some file somewhere already. Any information you have (even if it's bad news) would be much appreciated. Update Using @Lars Truijens idea, I was able to get the Windows 7 look for the major controls, but unfortunately it did not work for the WPF Toolkit DataGrid control, which I need. DataGrid looks like this with Aero theme DataGrid should look like this So, I'm still looking for a solution to this problem if anyone has any ideas. Maybe someone has built an extension to the Aero theme that covers the WPF toolkit controls? Again, any information you have is much appreciated. Update 2 - Problem solved! To get the Aero theme to work with WPF Toolkit controls, you just need to add a second Aero dictionary, so your App.xaml should now look like this. <Application.Resources> ... <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/PresentationFramework.Aero;component/themes/Aero.NormalColor.xaml" /> <ResourceDictionary Source="pack://application:,,,/WPFToolkit;component/Themes/Aero.NormalColor.xaml" /> ... </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> Also, I would recommend turning the gridlines off in your DataGrid controls (because they look horrible): <DataGrid GridLinesVisibility="None" ...>

    Read the article

  • Using Jquery to check if a URL is valid

    - by user102533
    A long running background process creates a text file to indicate the completion of the process. From the frontend, I'd need to check every few seconds if the text file has been created or not. I am doing this check from However the file is created in http://DomainB.com/Mytext.txt Can someone help me write a jquery script that checks for a file across domain? PS: Currently, I am doing a ajax postback that executes a WebMethod in ASP.NET that creates HttpWebRequest. This works functionally, but I have major performance problems. So, I need a light weight way of finding if a URL is valid or not.

    Read the article

  • Sprite backgrounds

    - by Mattias Akerman
    I use cocos2d for iphone and in my game I'm using a sprite as static background image. I've noticed that when removing code for adding the sprite the framerate goes from ~30fps to over 40fps. Is it any other way to show a static background that is less expensive? I'm not moving the background sprite at all. To code right now: background = [Sprite spriteWithFile:@"t1_5.jpg"]; [self addChild:background z:0]; background.position = ccp(240, 160);

    Read the article

  • Blackberry storm - update layout on tilt

    - by sujithRavindran
    Hi, have developed an app for BB storm while tilting the device the background image of the app screen does not matches with the screen size, i have tried with the sublayout method public void sublayout(int width, int height) { //update scrren layout based on orientation if(Display.getOrientation()== Display.ORIENTATION_LANDSCAPE) { invalidate(); } else if(Display.getOrientation()== Display.ORIENTATION_PORTRAIT) { invalidate(); } super.sublayout(width, height); } Still not successfull can any one help to sort out this tilt issue in BB storm Thanks SujithRavindran Rapidvaluesolutions

    Read the article

  • problem with the connectivity/updation using db2(universal driver)

    - by rams
    I choosed a web project in order to do that i am using an IDE (Eclipse), database (DB2 universal driver) and Apache Tomcat server. So, by gods grace every thing has gone well but when I try to update data to DB2 database through JDBC code then I am getting an SQL DB error as :: DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704, SQLERRMC: DB2ADMIN.REGISTER where register is my table name and even i logged in as db2admin but i think there is no connectivity established but still its not resolved

    Read the article

  • Where is a good permanent place to install custom bash scripts?

    - by Tchalvak
    I'm about to install "leiningen" which is a bash script for the clojure programming language with a lot of usefulness... ...but I'm not sure where it is appropriate to -put- a executable script in the linux system so that it's permanently and stable-ly available. I don't think that anywhere in /home makes sense, but I don't know which directory/directories are supposed to be used for that. /usr/share?

    Read the article

  • SQL2K8R2: StreamInsight changes at RTM: Hopping Windows

    - by Greg Low
    We've been working on updating our demos and samples for the RTM changes of StreamInsight. I'll detail these as I come across them. The first is that there is a change to the HoppingWindow. The first two parameters are the same in the constructor but the third parameter is now required. It is the HoppingWindowOutputPolicy. Currently, there is only a single option for this which is ClipToWindowEnd. So you can create a HoppingWindow like this: var queryOutput = from w in input.HoppingWindow ( TimeSpan...(read more)

    Read the article

  • Tables relationship in Cakephp

    - by kwokwai
    Hi all, I am new to Models structure in Cakephp. A few weeks ago I came across a tutorial in which the author got three tables in Database: Table A: {ID, Description, IsActive} Table B: {ID, TableA_ID, Description, CreationDate, ModifiedDate} Table A_B: {ID, TableA_ID, TableB_ID} The author of the tutorial said that the third table (Table A_B) is needed to run in CakePHP. I don't understand. Is there any specific documentation in CakePHP that I can refer to? I know there is a CookBook in Cakephp web site, but I couldn't find the relevant infromation.

    Read the article

  • Template Sort In C++

    - by wdow88
    Hey all, I'm trying to write a sort function but am having trouble figuring out how to initialize a value, and making this function work as a generic template. The sort works by: Find a pair =(ii,jj)= with a minimum value = ii+jj = such at A[ii]A[jj] If such a pair exists, then swap A[ii] and A[jj] else break; The function I have written is as follows: template <typename T> void sort(T *A, int size) { T min =453; T temp=0; bool swapper = true; while(swapper) { swapper = false; int index1 = 0, index2 = 0; for (int ii = 0; ii < size-1; ii++){ for (int jj = ii + 1; jj < size; jj++){ if((min >= (A[ii]+A[jj])) && (A[ii] > A[jj])){ min = (A[ii]+A[jj]); index1 = ii; index2 = jj; swapper = true; } } } if (!swapper) return; else { temp = A[index1]; A[index1] = A[index2]; A[index2] = temp; sort(A,size); } } } This function will successfully sort an array of integers, but not an array of chars. I do not know how to properly initialize the min value for the start of the comparison. I tried initializing the value by simply adding the first two elements of the array together (min = A[0] + A[1]), but it looks to me like for this algorithm it will fail. I know this is sort of a strange type of sort, but it is practice for a test, so thanks for any input.

    Read the article

  • <asp:Table> Vs html <table>

    - by keith
    What are the pros and cons between using the ASP.Net control compared to the old reliable table html implementation. I know that the asp:Table will end up on the returned page as a html table, and from looking into it so far people are saying its easier to work with the asp:Table in the server side code, but I'd love to hear what the stackoverflow community has to say about the matter.

    Read the article

  • MATLAB: How do I get 3D coordiantes from a user-click?

    - by John
    I'm using Matlab to create a small chess game for one of my courses this semester. The thing I'm having trouble with is having the user be able to select one of the chess pieces. To simplify things, I'm making it so that the user selects a piece by clicking on the square that the chess piece resides on rather than clicking the piece itself (which I assume would be much more difficult). I know how to get the x and y coordinates of the view-port, but how do I transform these coordinates into 3-space coordinates? I know that there are multiple x,y,z coordinates associated with each view-port coordinate, but I'm only interested in the x,y,z coordinate where z = 0 (since the board itself is in the x,y plane that intersects the z axis where z = 0). Thanks!

    Read the article

  • In ArrayBlockingQueue, why copy into ReentrantLock field into local final variable?

    - by mjlee
    In ArrayBlockingQueue, any method that requires lock will get set 'final' local variable before calling 'lock()'. public boolean offer(E e) { if (e == null) throw new NullPointerException(); final ReentrantLock lock = this.lock; lock.lock(); try { if (count == items.length) return false; else { insert(e); return true; } } finally { lock.unlock(); } } Is there any reason to set a local variable 'lock' from 'this.lock' when field 'this.lock' is final also. Additionally, it also set local variable of E[] before acting on. private E extract() { final E[] items = this.items; E x = items[takeIndex]; items[takeIndex] = null; takeIndex = inc(takeIndex); --count; notFull.signal(); return x; } Is there any reason for copying to local final variable?

    Read the article

  • How to automatically include generated source files into a C# project in Visual Studio?

    - by Charles Prakash Dasari
    I have a situation where I need to generate a bunch of C# code files in a prebuild step of a project and include the generated files into the current project for compilation. Is there a way to do this cleanly without having to muck with the project file every time the prebuild step is run? My solution should work for both IDE based build and a Team Build based on MSBuild. Since both are MSBuild based, I suspect there won't be much difference; but wanted to call it out. Any help is greatly appreciated, thanks!

    Read the article

  • Is DataGrid a necessity in WPF?

    - by Jobi Joy
    I have seen a lot of discussions going on and people asking about DataGrid for WPF and complaining about Microsoft for not having one with their WPF framework till date. We know that WPF is a great UI technology and have the Concept of ItemsControl,DataTemplate, etc,etc to make great UX. Even WPF has got a more closely matching control- ListView, which can be easily templated to give better UX than a traditional Datagrid like display. And I would say a readymade DataGrid control will kill or hide a lot of creativity and it surely will decrease the innovations in User Experience field. So what is your opinion about the need of DataGrid in WPF as a Framework component? If you feel it is necessary then is it just because the world is so used to the DatGrid way of data display for many years? Some other threads having the discussion about DatGrid are here and here Link to WPF ToolKit - Latest WPF DatGrid

    Read the article

  • More then one emacs terminal

    - by Mad Wombat
    I am getting more and more used to doing everything from inside emacs, but it seems that eshell, shell and term will only run one instance each. Is there a way to run multiple terminals (preferably term) inside emacs?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >