Search Results

Search found 301 results on 13 pages for 'horace ho'.

Page 8/13 | < Previous Page | 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Which OpenGL functions are not GPU-accelerated?

    - by Xavier Ho
    I was shocked when I read this (from the OpenGL wiki): glTranslate, glRotate, glScale Are these hardware accelerated? No, there are no known GPUs that execute this. The driver computes the matrix on the CPU and uploads it to the GPU. All the other matrix operations are done on the CPU as well : glPushMatrix, glPopMatrix, glLoadIdentity, glFrustum, glOrtho. This is the reason why these functions are considered deprecated in GL 3.0. You should have your own math library, build your own matrix, upload your matrix to the shader. For a very, very long time I thought most of the OpenGL functions use the GPU to do computation. I'm not sure if this is a common misconception, but after a while of thinking, this makes sense. Old OpenGL functions (2.x and older) are really not suitable for real-world applications, due to too many state switches. This makes me realise that, possibly, many OpenGL functions do not use the GPU at all. So, the question is: Which OpenGL function calls don't use the GPU? I believe knowing the answer to the above question would help me become a better programmer with OpenGL. Please do share some of your insights.

    Read the article

  • Select-all checkboxes in a FORM_TAG

    - by Horace Ho
    In a form_tag, there is a list of 10 to 15 checkboxes: <%= check_box_tag 'vehicles[]', car.id %> How can I select-all (put a tick in every single) checkboxes by RJS? Thanks EDIT: Sorry I didn't make my question clear. What I meant to ask is how to add a "Select/Un-select All" link in the same page to toggle the checkboxes.

    Read the article

  • (Free) Text editor on Windows with a folder view?

    - by Horace Ho
    I have to stay away from my MacBook and will use Windows for a while. I missed Textmate's folder view when editing my rails projects. Is there an editor on Windows with the folder view? I know there is the E text editor. But I'll save a few bucks if there is a free (cheaper) alternative, as I won't stay in Windows for long ...

    Read the article

  • Put text directly to the left of an <LI>

    - by Horace Loeb
    I have a list of songs, and I want to put the word "New!" to the left of the new songs like this: How can I do this so that all the songs line up? I.e., I want the names of songs that aren't new to line up with the names of songs that are new, not with the start of the word "New" Note that this is trivial if "New!" is an image. I.e., I set the image as the background-image of the <li> and give it some padding-left

    Read the article

  • Form data upload from iPhone to PHP server via https

    - by Horace Ho
    Is there a good tutorial or sample project of how to upload data from iPhone to a self-owned web server? The project is like: A survey application on iPhone which stores the user input data in a plist When there is internet connection, the program will enable an "Upload" button When the Upload button is clicked, the program will upload the data via HTTP form submit (POST) The server is Linux + MySQL + Apache + PHP The data should be sent via a https:// connection

    Read the article

  • C#: Convert array to use in params with additional parameters

    - by user1805759
    I have a method that takes params. Inside the method another variable shall be added to the output: private void ParamsTest(params object[] objs) { var foo = "hello"; // Invalid: Interpretes objs as single array parameter: Console.WriteLine("{0}, {1}, {2}", foo, objs); } When I call ParamsTest("Hi", "Ho"); I would like to see the output. hello Hi Ho What do I need to do? I can copy foo and objs into a new array and pass that array to WriteLine but is there a more elegant way to force objs to behave as params again? Kind of objs.ToParams()?

    Read the article

  • MySQL 5 in MySQL 4 compatible mode for one database?

    - by Horace Ho
    In a recent project, I have to maintain some PHP code. I set up a development server and installed MySQL, Apache, PHP, ..etc. The program is terminated with an error: Unknown column _ _ _ in 'on clause' Cannot select .... Google shows that it's a change of syntax around JOINs, parentheses are needed. As you may imagine, fixing all that PHP SQL strings will be the last resort. _< Is is possible to config MySQL 5 to run at MySQL 4 compatible mode? Or even better, for only one database? Thanks! p.s. Since we are going to host the code on a new production server (MySQL 5 on a CentOS box), the chance to install MySQL 4 on the new server might be slim.

    Read the article

  • Cannot make a static reference to the non-static type MyRunnable

    - by kaiwii ho
    Here is the whole code : import java.util.ArrayList; public class Test{ ThreadLocal<ArrayList<E>>arraylist=new ThreadLocal<ArrayList<E>>(){ @Override protected ArrayList<E> initialValue() { // TODO Auto-generated method stub //return super.initialValue(); ArrayList<E>arraylist=new ArrayList<E>(); for(int i=0;i<=20;i++) arraylist.add((E) new Integer(i)); return arraylist; } }; class MyRunnable implements Runnable{ private Test mytest; public MyRunnable(Test test){ mytest=test; // TODO Auto-generated constructor stub } @Override public void run() { System.out.println("before"+mytest.arraylist.toString()); ArrayList<E>myarraylist=(ArrayList<E>) mytest.arraylist.get(); myarraylist.add((E) new Double(Math.random())); mytest.arraylist.set(myarraylist); System.out.println("after"+mytest.arraylist.toString()); } // TODO Auto-generated method stub } public static void main(String[] args){ Test test=new Test<Double>(); System.out.println(test.arraylist.toString()); new Thread(new MyRunnable(test)).start(); new Thread(new MyRunnable(test)).start(); System.out.println(arraylist.toString()); } } my questions are: 1\ why the new Thread(new MyRunnable(test)).start(); cause the error: Cannot make a static reference to the non-static type MyRunnable ? 2\ what is the static reference refer to right here? thx in advanced

    Read the article

  • VB6 debugging- doesn't go to error handling code.

    - by Can Ho
    Hi, I'm maintaining a vb6 project(ActiveX DLL). When debugging, the app run into the following function: Public Function HasValue(ByVal vValue) As Boolean On Error GoTo Err If IsMissing(vValue) Then HasValue = False ElseIf IsNull(vValue) Or Len(vValue) = 0 Then HasValue = False ElseIf isEmpty(vValue) Then HasValue = False Else HasValue = True End If Exit Function Err: If IsArray(vValue) Or IsObject(vValue) Then HasValue = True Else HasValue = False End If End Function and it stops at the line ElseIf IsNull(vValue) Or Len(vValue) = 0 Then vValue is a custom object, contains some properties(obviously, not null). Although I didn't put any break point there, the app stopped there and alerted error dialog saying that "Run-time error '438': Object doesn't support this property or method". We had error handling code but the app didn't run to error handling code. It just stopped at the line causing the error and I had to stop the application. Do you have any idea about that? Thank you very much.

    Read the article

  • How good is the Rails sanitize() method?

    - by Horace Loeb
    Can I use ActionView::Helpers::SanitizeHelper#sanitize on user-entered text that I plan on showing to other users? E.g., will it properly handle all cases described on this site? Also, the documentation mentions: Please note that sanitizing user-provided text does not guarantee that the resulting markup is valid (conforming to a document type) or even well-formed. The output may still contain e.g. unescaped ’<’, ’’, ’&’ characters and confuse browsers. What's the best way to handle this? Pass the sanitized text through Hpricot before displaying?

    Read the article

  • Is it possible to set two encodings for one hml?

    - by Horace Ho
    Is there a way to specify certain part of a html file as another encoding? The default encoding for the (generated) html is utf-8. However, some of the included data to be inserted in the html is in another encoding. It's something like: <div> the normal html in utf-8 </div> <div> <%= raw_data_in_another_encoding %> </div> Is there a way to hint a browser to render the 2nd <div> in another encoding? thanks

    Read the article

  • NULL value in :conditions =>

    - by Horace Ho
    Contract.all(:conditions => ['voided == ?', 0]).size => 364 Contract.all(:conditions => ['voided != ?', 0]).size => 8 Contract.all.size => 441 the 3 numbers does not added up (364 + 8 != 441). What's the proper way write the :conditions to count the rows which the voided column value is NULL or equal to zero?

    Read the article

  • PHP script sample for iPhone hi-score/survey uploading?

    - by Horace Ho
    I am looking for a PHP example/tutorial which can accept hi-scores/survey upload from an iPhone. Hopefully, the PHP script: accepts POST, in additional to GET works over SSL (https) connects to MySQL In addition, it'd best the iPhone can get a session from the server and submit the session value along with the hi-score. Thanks

    Read the article

  • How to automate IE/Firefox to download some files from a https: website with Javascript links?

    - by Horace Ho
    Some of my users download several pdf files from an internet website regularly. They'd like to automate the process to save a few minutes every day, and most importantly, to minimize errors. I tried mechanize but failed as mechanize does not process javascripts. Since the download links in the remote site are all triggered by javescript, I am looking for solutions to automate the browser itself. Any recommendations? https remote server login and search are FORM POST file download link are JavaScripts on win32 IE or Firefox thanks!

    Read the article

  • Is there is software license for code review (read-) only?

    - by Horace Ho
    I am going to development a product related to security. It's my personal belief that any security related product should release it's source code for review. However, I also want to sell it as a commercial product and keep the code ownership to myself and don't expect deviated work. Is there a software license for this purpose? Thanks.

    Read the article

  • Update paths of already-created Paperclip attachments

    - by Horace Loeb
    I used to have this buggy Paperclip config: class Photo < ActiveRecord::Base has_attached_file :image, :storage => :s3, :styles => { :medium => "600x600>", :small => "320x320>", :thumb => "100x100#" }, :s3_credentials => "#{RAILS_ROOT}/config/s3.yml", :path => "/:style/:filename" end This is buggy because two images cannot have the same size and filename. To fix this, I changed the config to: class Photo < ActiveRecord::Base has_attached_file :image, :storage => :s3, :styles => { :medium => "600x600>", :small => "320x320>", :thumb => "100x100#" }, :s3_credentials => "#{RAILS_ROOT}/config/s3.yml", :path => "/:style/:id_:filename" end Unfortunately this breaks all URLs to attachments I've already created. How can I update those file paths or otherwise get the URLs to work?

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13  | Next Page >