Search Results

Search found 153 results on 7 pages for 'ajay hopkins'.

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

  • using iphone to control mac

    - by Ajay Pandey
    i want to use iPhone touch screen as the touchPad for my mac while both devices are connected via bluetooth. So far i hv gone for two approaches what i want is an application which when launched turns the bluetooth on and get connected to mac.Further ...screen of iPhone becomes the touch pad for mac. i dont want to install anything at the mac like any server........ I have already tried the vnc and remotePad approach. the one with vnc looks more promising for me..but even in that case i have to install a vnc server on mac ,i guess and then we'll have to actually call vnc client while my application is still running,which does not look real in 3.2 verson as it does not support multi tasking. Is there any other way of doing it? or is there anything wrong in my above interpretation? please let me know if there is anyother approach of doing the same or if i can do any thing different with my current approach. hoping for quick response Thanks

    Read the article

  • Installing libssh2 on debian

    - by Ajay
    Hi I'm trying to install libssh2 for 64-bit. I'm using the following code for installation: cd libssh2-1.4.3/ export CFLAGS="-mabi=64 -march=mips64r2" ./configure --with-libz --with-libgcrypt --with-libz-prefix=`pwd`/../../support__ libs/libs/zlib/ --with-libgcrypt-prefix=`pwd`/../../support_libs/``libs/extra --wii thout-libssl-prefix --prefix=`pwd`/../../support_libs/libs/extra_2 make && make install without using "export CFLAGS="-mabi=64 -march=mips64r2" it compiles the binaries in 32-bit and whem i use #export for 64-bit, it gives this configuration error:: checking for libgcrypt... no configure: error: cannot find OpenSSL or Libgcrypt, try --with-libssl-prefix=PATH or --with-libgcrypt-prefix=PATH make: *** No targets specified and no makefile found.

    Read the article

  • Site getting blocked on corporate networks

    - by ajay
    Hi there, Our site is getting blocked in corporate networks across various companies, but not all. Would appreciate help on what could be the reasons for this and how we can resolve this? Attached are a couple of snapshots that customers have sent us from the companies where the site is getting blocked. http://www.freeimagehosting.net/uploads/2ca59a8460.jpg

    Read the article

  • How to control DVR connected cameras as IP Cameras

    - by Ajay
    We have analog IR cameras (not IP Cameras) and they are connected to DVR model no is (DVR Model: DVR H264, 16 Channel - ECOR264-16X1). We assigned a static IP to DVR and able to view all the cameras connected to it. Our requirement is to view individual cameras and recording option in remote location (the recorded data should store in remote) as like IP Cameras. Is it possible, if not, are there any DVR Model which can support like this.

    Read the article

  • Tomcat not working in in VPS with Cenots 6 Openvz Node

    - by Ajay Jain
    can anybody help me in this issue? in Centos 5.x node Its working file. Its not starred, I have tried webuzo .. in webuzo installation its hang on installation process, in turnkeylinux apps temps servies not start, I have also tried Debian 6 Its started in console but when i tried to access in browse its not work I have checked no port blocked in firewall. But in Centos .x Node - Its working in in all way.

    Read the article

  • Underlying Concept Behind Keyboard Mappings

    - by ajay
    I am frustrated with key mapping issues. On my Linux box, if I type Home/End in Vim, then the cursor actually moves to the beginning/end of the line. On my Mac when I am on TextEdit, if I do Fn + Left or Fn + Right, it takes me to beginning/end of the line. But if I am on Vim on my Mac terminal, then the same key combinations don't work. Why? I see online all the different cryptic settings that I have to paste in .vimrc to make this work, but I can't find any explanation for those cryptic map, imap settings. What is the underlying issue here, and how can I fix it? Thanks!

    Read the article

  • How can I dynamically change auto complete entries in a C# combobox or textbox?

    - by Sam Hopkins
    I have a combobox in C# and I want to use auto complete suggestions with it, however I want to be able to change the auto complete entries as the user types, because the possible valid entries are far too numerous to populate the AutoCompleteStringCollection at startup. As an example, suppose I'm letting the user type in a name. I have a list of possible first names ("Joe", "John") and a list of surnames ("Bloggs", "Smith"), but if I have a thousand of each, then that would be a million possible strings - too many to put in the auto complete entries. So initially I want to have just the first names as suggestions ("Joe", "John") , and then once the user has typed the first name, ("Joe"), I want to remove the existing auto complete entries and replace them with a new set consisting of the chosen first name followed by the possible surnames ("Joe Bloggs", "Joe Smith"). In order to do this, I tried the following code: void InitializeComboBox() { ComboName.AutoCompleteMode = AutoCompleteMode.SuggestAppend; ComboName.AutoCompleteSource = AutoCompleteSource.CustomSource; ComboName.AutoCompleteCustomSource = new AutoCompleteStringCollection(); ComboName.TextChanged += new EventHandler( ComboName_TextChanged ); } void ComboName_TextChanged( object sender, EventArgs e ) { string text = this.ComboName.Text; string[] suggestions = GetNameSuggestions( text ); this.ComboQuery.AutoCompleteCustomSource.Clear(); this.ComboQuery.AutoCompleteCustomSource.AddRange( suggestions ); } However, this does not work properly. It seems that the call to Clear() causes the auto complete mechanism to "turn off" until the next character appears in the combo box, but of course when the next character appears the above code calls Clear() again, so the user never actually sees the auto complete functionality. It also causes the entire contents of the combo box to become selected, so between every keypress you have to deselect the existing text, which makes it unusable. If I remove the call to Clear() then the auto complete works, but it seems that then the AddRange() call has no effect, because the new suggestions that I add do not appear in the auto complete dropdown. I have been searching for a solution to this, and seen various things suggested, but I cannot get any of them to work - either the auto complete functionality appears disabled, or new strings do not appear. Here is a list of things I have tried: Calling BeginUpdate() before changing the strings and EndUpdate() afterwards. Calling Remove() on all the existing strings instead of Clear(). Clearing the text from the combobox while I update the strings, and adding it back afterwards. Setting the AutoCompleteMode to "None" while I change the strings, and setting it back to "SuggestAppend" afterwards. Hooking the TextUpdate or KeyPress event instead of TextChanged. Replacing the existing AutoCompleteCustomSource with a new AutoCompleteStringCollection each time. None of these helped, even in various combinations. Spence suggested that I try overriding the ComboBox function that gets the list of strings to use in auto complete. Using a reflector I found a couple of methods in the ComboBox class that look promising - GetStringsForAutoComplete() and SetAutoComplete(), but they are both private so I can't access them from a derived class. I couldn't take that any further. I tried replacing the ComboBox with a TextBox, because the auto complete interface is the same, and I found that the behaviour is slightly different. With the TextBox it appears to work better, in that the Append part of the auto complete works properly, but the Suggest part doesn't - the suggestion box briefly flashes to life but then immediately disappears. So I thought "Okay, I'll

    Read the article

  • Regex to replace relative link with root relative link

    - by Kendall Hopkins
    I have a string of text that contains html with all different types of links (relative, absolute, root-relative). I need a regex that can be executed by PHP's preg_replace to replace all relative links with root-relative links, without touching any of the other links. I have the root path already. Replaced links: <tag ... href="path/to_file.ext" ... > ---> <tag ... href="/basepath/path/to_file.ext" ... > Untouched links: <tag ... href="/any/path" ... > <tag ... href="protocol://domain.com/any/path" ... >

    Read the article

  • Big-O of PHP functions?

    - by Kendall Hopkins
    After using PHP for a while now, I've noticed that not all PHP built in functions as fast as expected. Consider the below two possible implementations of a function that finds if a number is prime using a cached array of primes. //very slow for large $prime_array $prime_array = array( 2, 3, 5, 7, 11, 13, .... 104729, ... ); $result_array = array(); foreach( $array_of_number => $number ) { $result_array[$number] = in_array( $number, $large_prime_array ); } //still decent performance for large $prime_array $prime_array => array( 2 => NULL, 3 => NULL, 5 => NULL, 7 => NULL, 11 => NULL, 13 => NULL, .... 104729 => NULL, ... ); foreach( $array_of_number => $number ) { $result_array[$number] = array_key_exists( $number, $large_prime_array ); } This is because in_array is implemented with a linear search O(n) which will linearly slow down as $prime_array grows. Where the array_key_exists function is implemented with a hash lookup O(1) which will not slow down unless the hash table gets extremely populated (in which case it's only O(logn)). So far I've had to discover the big-O's via trial and error, and occasionally looking at the source code. Now for the question... I was wondering if there was a list of the theoretical (or practical) big O times for all* the PHP built in functions. *or at least the interesting ones For example find it very hard to predict what the big O of functions listed because the possible implementation depends on unknown core data structures of PHP: array_merge, array_merge_recursive, array_reverse, array_intersect, array_combine, str_replace (with array inputs), etc.

    Read the article

  • Sort files by name in Java differs from Windows Explorer

    - by Martyn Hopkins
    I have a simple Java program which reads a file directory and outputs a file list. I sort the files by name: String [] files = dirlist.list(); files = sort(files); My problem is that it sorts by name in a different way than Windows Explorer does. For instance if I have these files: abc1.doc, abc12.doc, abc2.doc. Java will sort like this: abc1.doc abc12.doc abc2.doc When I open the folder in Explorer, my files are sorted like this: abc1.doc abc2.doc abc12.doc How can I make Java sorts my files like in Windows Explorer? Is this a Windows trick?

    Read the article

  • Code-Golf: one line PHP syntax

    - by Kendall Hopkins
    Explanation PHP has some holes in its' syntax and occasionally in development a programmer will step in them. This can lead to much frustration as these syntax holes seem to exist for no reason. For example, one can't easily create an array and access an arbitrary element of that array on the same line (func1()[100] is not valid PHP syntax). The workaround for this issue is to use a temporary variable and break the statement into two lines, but sometimes that can lead to very verbose, clunky code. Challenge I know of a few of these holes (I'm sure there are more). It is quite hard to even come up with a solution, let alone in a code-golf style. Winner is the person with in the least characters total for all four Syntax Holes. Rules Statement must be one line in this form: $output = ...;, where ... doesn't contain any ;'s. Only use standard library functions (no custom functions allowed) Statement works identically to the assumed functional of the non-working syntax (even in cases that it fails). Statement must run without syntax error of any kind with E_STRICT | E_ALL. Syntax Holes $output = func_return_array()[$key]; - accessing an arbitrary offset (string or integer) of the returned array of a function $output = new {$class_base.$class_suffix}(); - arbitrary string concatenation being used to create a new class $output = {$func_base.$func_suffix}(); - arbitrary string concatenation being called as function $output = func_return_closure()(); - call a closure being returned from another function

    Read the article

  • I'm writing a spellchecking program, how do I replace ch in a string?

    - by Ajay Hopkins
    What am I doing wrong/what can I do? import sys import string def remove(file): punctuation = string.punctuation for ch in file: if len(ch) > 1: print('error - ch is larger than 1 --| {0} |--'.format(ch)) if ch in punctuation: ch = ' ' return ch else: return ch ref = (open("ref.txt","r")) test_file = (open("test.txt", "r")) dictionary = ref.read().split() file = test_file.read().lower() file = remove(file) print(file) This is in Python 3.1.2

    Read the article

  • How to redirect a URL with GET variables in routes.rb without Rails stripping out the variable first?

    - by Michael Hopkins
    I am building a website in Rails to replace an existing website. In routes.rb I am trying to redirect some of the old URLs to their new equivalents (some of the URL slugs are changing so a dynamic solution is not possible.) My routes.rb looks like this: match "/index.php?page=contact-us" => redirect("/contact-us") match "/index.php?page=about-us" => redirect("/about-us") match "/index.php?page=committees" => redirect("/teams") When I visit /index.php?page=contact-us I am not redirected to /contact-us. I have determined this is because Rails is removing the get variables and only trying to match /index.php. For example, If I pass /index.php?page=contact-us into the below routes I will be redirected to /foobar: match "/index.php?page=contact-us" => redirect("/contact-us") match "/index.php?page=about-us" => redirect("/about-us") match "/index.php?page=committees" => redirect("/teams") match "/index.php" => redirect("/foobar") How can I keep the GET variables in the string and redirect the old URLs the way I'd like? Does Rails have an intended mechanism for this?

    Read the article

  • im writing a spellchecking program, how do i replace ch in a string..eg..

    - by Ajay Hopkins
    what am i doing wrong/what can i do?? import sys import string def remove(file): punctuation = string.punctuation for ch in file: if len(ch) > 1: print('error - ch is larger than 1 --| {0} |--'.format(ch)) if ch in punctuation: ch = ' ' return ch else: return ch ref = (open("ref.txt","r")) test_file = (open("test.txt", "r")) dictionary = ref.read().split() file = test_file.read().lower() file = remove(file) print(file) p.s, this is in Python 3.1.2

    Read the article

  • Changing <object> height and width works in Chrome but not Firefox or IE. Why?

    - by Michael Hopkins
    I am making a site with two Youtube videos. These videos use the raw embed code from Youtube. The site's design doesn't work with any of the default Youtube sizes, so I am writing code to automatically resize the video. Here is my code. There will never be more than these two tags on the page, otherwise I'd do a better job selecting the videos. <script language='JavaScript' type='text/javascript'> var x=document.getElementsByTagName('object'); x.[0].width='350'; x.[0].height='350'; x.[1].width='350'; x.[1].height='350'; </script> For reference, here's a sample default Youtube embed that the code might alter: <object width="480" height="385"> <param name="movie" value="http://www.youtube-nocookie.com/v/zSgiXGELjbc&hl=en_US&fs=1&rel=0"></param> <param name="allowFullScreen" value="true"></param> <param name="allowscriptaccess" value="always"></param> <embed src="http://www.youtube-nocookie.com/v/zSgiXGELjbc&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed> </object> In Chrome, the video players sit perfectly in a 350x350 box. In IE and FF (latest versions), the videos are the unchanged, normal size. I cannot find anything in Google that explans why this won't work. I have tried using setattribute, for loops, adjusting both and , single-quotes and double-quotes, etc. Any ideas what is going wrong?

    Read the article

  • List of Big-O for PHP functions?

    - by Kendall Hopkins
    After using PHP for a while now, I've noticed that not all PHP built in functions as fast as expected. Consider the below two possible implementations of a function that finds if a number is prime using a cached array of primes. //very slow for large $prime_array $prime_array = array( 2, 3, 5, 7, 11, 13, .... 104729, ... ); $result_array = array(); foreach( $array_of_number => $number ) { $result_array[$number] = in_array( $number, $large_prime_array ); } //still decent performance for large $prime_array $prime_array => array( 2 => NULL, 3 => NULL, 5 => NULL, 7 => NULL, 11 => NULL, 13 => NULL, .... 104729 => NULL, ... ); foreach( $array_of_number => $number ) { $result_array[$number] = array_key_exists( $number, $large_prime_array ); } This is because in_array is implemented with a linear search O(n) which will linearly slow down as $prime_array grows. Where the array_key_exists function is implemented with a hash lookup O(1) which will not slow down unless the hash table gets extremely populated (in which case it's only O(logn)). So far I've had to discover the big-O's via trial and error, and occasionally looking at the source code. Now for the question... I was wondering if there was a list of the theoretical (or practical) big O times for all* the PHP built in functions. *or at least the interesting ones For example find it very hard to predict what the big O of functions listed because the possible implementation depends on unknown core data structures of PHP: array_merge, array_merge_recursive, array_reverse, array_intersect, array_combine, str_replace (with array inputs), etc.

    Read the article

  • Lambda recursive PHP functions.

    - by Kendall Hopkins
    Is it possible to have a PHP function that is both recursive and anonymous (lambda). This is my attempt to get it to work, but it doesn't pass in the function name. $factorial = function( $n ) use ( $factorial ) { if( $n == 1 ) return 1; return $factorial( $n - 1 ) * $n; }; print $factorial( 5 ); I'm also aware that this is a bad way to implement factorial, it's just an example.

    Read the article

  • Android Device Management

    - by Jon Hopkins
    I'm looking at the possibility of using Android as a secure corporate mobile platform. One of the pre-requisites for this will be a way of managing multiple devices, security policies, software deployment, that sort of thing - essentially the things the BlackBerry Enterprise Server handles for BlackBerry or MDM (or something 3rd party like SOTI) handles for Windows Mobile. Does such a thing exist for Android? It's a platform we're interested in but without this right now (and we're not in a position to build it ourselves) it's a non-starter.

    Read the article

  • Tech Cast Live - Java and Oracle, One Year Later - February 15th 10AM PST

    - by Cassandra Clark
    Join us for a special live conversation with Ajay Patel, Vice President of Product Development for Application Grid Products and Justin Kestelyn, Director of the Oracle Technology Network. Justin and Ajay will discuss the changes that have come to Java and Oracle since the Sun acquisition, just over a year ago. This live broadcast conversation will include discussion on: - Highlights, challenges and what we learned over the past year - The Future of Java and its importance to Oracle and the community - Oracle's Application Grid product portfolio today Watch Live Event February 15th Watch Archived TechCast Lives You will also have the chance to submit questions to the speakers live on the show, for real-time feedback by using #techcastlive. If your question is read on air we will send you a Free I am the Future of Java t-shirt* *Promotion Details After you have submitted your question and it is read on the live TechCast held February 15th your shirt should arrive in two to four weeks while supplies last. No purchase, payments, or fees are required to receive the gift. Limit one thank you gift per person, and the offer is available only while supplies last. Oracle reserves the right to modify or terminate this offer at any time, for any reason. This offer is not available to Oracle employees or residents of countries subject to U.S. embargo (including Cuba, Iran, Iraq, Libya, North Korea, Sudan, and Syria). Due to Federal Government regulations, this offer is not available to Federal Government customers. Those residing in India or Brazil will be given a substitute gift as we can not ship t-shirts to your country. You are responsible for complying with your employer's policies regarding acceptance of promotional items, and for government laws, regulations and agency policies, if you are a government employee you will not be able to participate. Must be 18 years of age or older. Void where prohibited. Neither Oracle nor any third party assisting Oracle with this offer is responsible for any problems, errors, delays, or technical malfunction related to or impacting this offer. Oracle respects your right to privacy and your information will not be distributed or used for any other purpose. For more information on Oracle's privacy policy, please review our http://www.oracle.com/html/privacy-policy.html. If you have any questions, please contact us at [email protected].

    Read the article

  • TechCast Live: Java and Oracle, One Year Later (tomorrow!)

    - by Jacob Lehrbaum
    On year ago, tomorrow, Oracle became the steward of Java through its acquisition of Sun.We invite you to join us tomorrow on the anniversary of this memorable event for a special TechCast Live conversation with Ajay Patel, VP of Product development for Application Grid Products and Justin Kestelyn of Oracle Technology Network. Topics that will be covered include:- Highlights, challenges and what we learned over the past year - The Future of Java and its importance to Oracle and the community - Oracle's Application Grid product portfolio todayDate:Feb, 15, 10:00am PSTWatch it live (tomorrow)

    Read the article

  • SQL Server -> 'SQL_Latin1_General_CP1_CI_AS' Collation -> Varchar Column -> Languages Supported

    - by Ajay Singh
    All, We are using SQL Server 2008 with Collation Setting as 'SQL_Latin1_General_CP1_CI_AS'. We are using Varchar column to store textual data. We know that we cannot store Double Byte data in Varchar column and hence cannot support languages like Japanese and Chinese without converting it to NVarchar. However, will it be safe to say that all Single Byte Characters can be stored in Varchar column without any problem? If yes then from where can I get the list of languages which needs Single Byte for storage and the list of languages which needs double byte? Any assistance in this regard is highly appreciated. Thanks in advance.

    Read the article

  • How to find out memory layout of your data structure implementation on Linux 64bit machine

    - by ajay
    In this article, http://cacm.acm.org/magazines/2010/7/95061-youre-doing-it-wrong/fulltext the author talks about the memory layouts of 2 data structures - The Binary Heap and the B-Heap and compares how one has better memory layout than the other. http://deliveryimages.acm.org/10.1145/1790000/1785434/figs/f5.jpg http://deliveryimages.acm.org/10.1145/1790000/1785434/figs/f6.jpg I want to get hands on experience on this. I have an implementation of a N-Ary Tree and I want to find out the memory layout of my data structure. What is the best way to come up with a memory layout like the one in the article? Secondly, I think it is easier to identify the memory layout if it is an array based implementation. If the implementation of a Tree uses pointers then what Tools do we have or what kind of approach is required to map it's memory layout? Thanks!

    Read the article

  • externalizing junit stub objects.

    - by Ajay
    Hi!    In my project we created stub files for testing junits in java(factories) itself. However, we have to externalize these stubs. After seeing a number of serializers/deserializers, we settled on using XStream to serialize and deserialize these stub objects. XStream works like a charm. Its pretty good at what it claims to be. Previously, we had a single factory class say AFactory which produced all the stubs needed for testing different test cases. Now when externalizing each of the stub generated, we hit a road block. We had to create 1 xml file for each stub produced by the factory. For example, public final class AFactory{ public static A createStub1(){ /*Code here */} public static A createStub2(){ /*Code here */} public static A createStub3(){ /*Code here */} } Now, when trying to move this stubs to external files, we had to create 1 xml file for each stub created(A-stub1.xml, A-stub2.xml and A-stub3.xml). The problem with this approach is that, it leads to proliferation of xml stub files. I was thinking, how about keeping all the stubs related to a single bean class in a single xml file. <?xml version="1.0"?> <stubs class="A"> <stub id="stub1"> <!-- Here comes the externalized xml stub representation --> </stub> <stub id="stub2"> </stub> </stubs> Is there a framework which allows you keep all the stub in xml representation in a single xml file as above ? Or What do you guys suggest should be the right approach to adhere to ?

    Read the article

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