Search Results

Search found 493 results on 20 pages for 'jimmy yuen ho wong'.

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

  • Get Data from Windows Form into C# program

    - by Jimmy
    I want my C# program to collect data. Then, when the OK button is clicked, I want this data to be loaded into my program -- such as into variables in Main(), or into data members of a class I have constructed, and I want the form to then go away -- not be hidden, but actually closed. Alas, read as I might in the book I have, the data collected by the form stays in the form, execution proceeds within the form, and the same form is used to display the result of the program's computations. Sheesh. All I want is to capture the form's information, close the form and proceed with my program. I would appreciate some tips on geting data from a form into Main() or into a class's data members. Thanks, Lucky

    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

  • Form graphics not set when form loads

    - by Jimmy
    My form has a group box which contains two overlapping rectangles. The form's other controls are two sets of four numeric up down controls to set the rectangles' colors. (nudF1,2,3 and 4 set the rectangle that's in front, and nudB1,2,3 and 4 set the rectangle that's behind.) Everything works fine, except that the rectangles do not display the colors set in the numeric up downs when the form first loads. The numeric up down controls' ChangeValue events all call the ShowColors() method. The form's Load event calls the csColorsForm_Load() method. Any suggestions? namespace csColors { public partial class csColorsForm : Form { public csColorsForm() { InitializeComponent(); } private void csColorsForm_Load(object sender, EventArgs e) { this.BackColor = System.Drawing.Color.DarkBlue; SetColors(sender, e); } private void SetColors(object sender, EventArgs e) { Control control = (Control)sender; String ctrlName = control.Name; Graphics objGraphics; Rectangle rect1, rect2; int colorBack, colorFore; objGraphics = this.grpColor.CreateGraphics(); // If calling control is not a forecolor control, paint backcolor rectangle if (ctrlName.Substring(0,4)!="nudF") { colorBack = int.Parse(SetColorsB("nudB"), NumberStyles.HexNumber); SolidBrush BrushB = new SolidBrush(Color.FromArgb(colorBack)); rect1 = new Rectangle(this.grpColor.Left, this.grpColor.Top, this.grpColor.Width, this.grpColor.Height); objGraphics.FillRectangle(BrushB, rect1); } // Always paint forecolor rectangle colorFore = int.Parse(SetColorsB("nudF"), NumberStyles.HexNumber); SolidBrush BrushF = new SolidBrush(Color.FromArgb(colorFore)); rect2 = new Rectangle(this.grpColor.Left, this.grpColor.Top, this.grpColor.Width, this.grpColor.Height); objGraphics.FillRectangle(BrushF, rect2); objGraphics.Dispose(); } private string SetColorsB(string nam) { string txt=""; for (int n = 1; n <= 4; ++n) { var ud = Controls[nam + n] as NumericUpDown; int hex = (int)ud.Value; txt += hex.ToString("X2"); } return txt; } private void btnClose_Click(object sender, EventArgs e) { this.Close(); } } }

    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

  • Subversion Problem on Mac OS X

    - by Mohsin Jimmy
    This exists in my httpd.conf file: <Location /svn> DAV svn SVNParentPath /Users/iirp/Sites/svn Allow from all #AuthType Basic #AuthName "Subversion repository" #AuthUserFile /Users/iirp/Sites/svn-auth-file #Require valid-user </Location> This is working file When I change this to: <Location /svn> DAV svn SVNParentPath /Users/iirp/Sites/svn #Allow from all AuthType Basic AuthName "Subversion repository" AuthUserFile /Users/iirp/Sites/svn-auth-file Require valid-user </Location> and when I access my repository through URL, it gives me the authentication screen but after that screen my svn repository is not showing up correctly. to see message that it gives to me is: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.

    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

  • 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

  • Clear Graphics Object to Black or other RGB

    - by Jimmy
    I am a rank beginner in C#. I am currently using this code: objGraphics.Clear(SystemColors.Control); What I want to do is Clear this object to black (or some other RGB color), and I'm stumped as to how to replace the SystemColors.Control with, preferably, an RGB color spec. I'd probably want to clear to black most of the time. Any help will be much appreciated!

    Read the article

  • DirectX equivalent of glBlendFunc(............)

    - by Jimmy Bouker
    I created a particle System in OpenGl that's working great. When I want to get a burning effect of a fire or a beam or something(Where the system kind of "glows" and fuses all the colors together) I use this method call with OpenGL. glBlendFunc(GL_SRC_ALPHA,GL_SRC_ALPHA) glBlendFunc(GL_DST_ALPHA,GL_ONE) I'm now trying to do the same thing using Direct3D Here is what I have tried: graphicsDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); graphicsDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); graphicsDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_ONE); but this has absolutely no effect at all on the look of my game! Anyone have a clue what could be the problem?

    Read the article

  • ASP.NET MVC 2 Model object validation

    - by Jimmy
    Hey guys, I'm trying to validate a model object outside of the context of ModelState within a controller, I currently have a parser that creates model objects from an excel file and I want to be able to report how many entries were added to the database and how many failed, is there a way to validate a model object on its data annotations outside of model binding? I'm looking for something similar to the rails model method of model.valid? or a way for me to implement that myself. My current solution is just manually checking if a few key fields are present but this duplicates requirements between my model class and its metadata, there has to be a better way to hook into the model validation checking that is done by mvc 2. Thanks

    Read the article

  • jQuery & IE crashing on $('#someDiv').hide();

    - by Jimmy
    Well after a while of scratching my head and going "huh?" trying to figure out why IE would straight up crash when loading one of my pages loaded with jQuery goodness, I narrowed down the culprit to this line $('div#questions').hide(); And when I say IE crashes, I mean it fully crashes, attempting to do its webpage recovery nonsense that fails. I am running jQuery 1.4.2 and using IE 8 (haven't tested with any other versions) my current workaround is this: if ($.browser.msie) { window.location = "http://www.mozilla.com/en-US/products/download.html"; } For some reason I feel my IE users won't be very pleased with this solution though. The div in question has a lot of content in it and other divs that get hidden and displayed again, and all of that works just fine and dandy, it is only when the giant parent div is hidden that IE flips out and stabs itself. Has anyone encountered this or have any possible ideas of what is going wrong? EDIT: Everything is wrapped up in the $(document).ready(function() { }); And my code is all internal so I can't link it unfortunately.

    Read the article

  • Query to get row from one table, else random row from another

    - by Jimmy
    tblUserProfile - I have a table which holds all the Profile Info (too many fields) tblMonthlyProfiles - Another table which has just the ProfileID in it (the idea is that this table holds 2 profileids which sometimes become monthly profiles (on selection)) Now when I need to show monthly profiles, I simply do a select from this tblMonthlyProfiles and Join with tblUserProfile to get all valid info. If there are no rows in tblMonthlyProfile, then monthly profile section is not displayed. Now the requirement is to ALWAYS show Monthly Profiles. If there are no rows in monthlyProfiles, it should pick up 2 random profiles from tblUserProfile. If there is only one row in monthlyProfiles, it should pick up only one random row from tblUserProfile. What is the best way to do all this in one single query ? I thought something like this select top 2 * from tblUserProfile P LEFT OUTER JOIN tblMonthlyProfiles M on M.profileid = P.profileid ORder by NEWID() But this always gives me 2 random rows from tblProfile. How can I solve this ?

    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

  • CLR - Common language runtime detected an invalid program in VS.NET

    - by Jimmy
    I have been using Visual Studio 2008 quite long but lately I am getting this message when I am developing an application in C#: Common language runtime detected an invalid program This happens when I try to enter to the properties of a component (text masked box properties, tool box property etc..). But it really became a problem when I tried to launch an other solution that I downloaded from the Developer's 5 star program of Microsoft and it didn't allowed me to launch at all and just got the same problem... I looked for the answer at google but just got some clues about people having the same vague error but in different situations like in ASP.NET I would appreciate any help with this issue... :( I do not want to reinstall VS, that will be my last resource... Update: I never figured out what the problem was so I installed a virtual machine with Windows XP on it, there I only have Visual Studio and Netbeans.

    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

  • Pause execution and run until form is clicked

    - by jimmy
    Newbie here. I have this code: while (v < 360) { v +=10; RunIt(); // need to wait half a second here } How do I wait the 1/2 second? Also, if this isn't asking too much, I'd like this to run repeatedly until the user clicks on the form. Thanks in advance.

    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

  • MySQL + Joomla + remote c# access

    - by Jimmy
    Hello, I work on a Joomla web site, installed on a MySQL database and running on IIS7. It's all working fine. I now need to add functionality that lets (Joomla-)registered users change some configuration data. Though I haven't done this yet, it looks straightforward enough to do with Joomla. The data is private so all external access will be done through HTTPS. I also need an existing c# program, running on another machine, to read that configuration data. Sure enough, this data access needs to be as fast as possible. The data will be small (and filtered by query), but the latency should be kept to a minimum. A short-term, client-side cache (less than a minute, in case a user updates his configuration data) seems like a good idea. I have done practically zero database/asp programming so far, so what's the best way of doing that last step? Should the c# program access the database 'directly' (using what? LINQ?) or setup some sort of Facade (SOAP?) service? If a service should be used, should it be done through Joomla or with ASP on IIS? Thanks

    Read the article

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