Search Results

Search found 382 results on 16 pages for 'numerical'.

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

  • Need help getting buttons to work...

    - by Mike Droid
    I am trying to get my first button to update a display number in my view when clicked. This view will have several buttons and "outputs" displayed. After reading examples and Q's here, I finally put something together that runs, but my first button is still not working; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.ship_layout); mSwitcher = (TextSwitcher) findViewById(R.id.eng_val); } private TextSwitcher mSwitcher; // Will be connected with the buttons via XML void onClick(View v){ switch (v.getId()) { case R.id.engplus: engcounter++; updateCounter(); break; case R.id.engneg: engcounter--; updateCounter(); break; } } private void updateCounter() { mSwitcher.setText(String.valueOf(engcounter)); } The .xml for this button is; <TextSwitcher android:id="@+id/eng_val" android:visibility="visible" android:paddingTop="9px" android:paddingLeft="50px" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/build" android:layout_toRightOf="@+id/engeq" android:textColor="#DD00ff00" android:textSize="24sp"/> This is within a Relative Layout that appears otherwise OK. When I had set the view to have a TextView with the number set as a string , the number displayed, but I could not figure out how to update the text with a numerical field. That may be my real problem. I have gone through many examples generally referenced from the dev. site (UI, Common Tasks, various samples), and I am still not seeing the connection here... Again, this is simply a try at getting variables to respond to buttons and update on the view. So, a few Q's for anyone that can help; 1) Is there any easier way of doing this (ie. send numerical value to View) ? 2) Why isn't my TextSwitcher displaying the number? 3) Should I be using a TextSwitcher here? 4) Any examples of this you can point me to?

    Read the article

  • How can I generate a list of #define values from C code?

    - by djs
    I have code that has a lot of complicated #define error codes that are not easy to decode since they are nested through several levels. Is there any elegant way I can get a list of #defines with their final numerical values (or whatever else they may be)? As an example: <header1.h> #define CREATE_ERROR_CODE(class, sc, code) ((class << 16) & (sc << 8) & code)) #define EMI_MAX 16 <header2.h> #define MI_1 EMI_MAX <header3.h> #define MODULE_ERROR_CLASS MI_1 #define MODULE_ERROR_SUBCLASS 1 #define ERROR_FOO CREATE_ERROR_CODE(MODULE_ERROR_CLASS, MODULE_ERROR_SUBCLASS, 1) I would have a large number of similar #defines matching ERROR_[\w_]+ that I'd like to enumerate so that I always have a current list of error codes that the program can output. I need the numerical value because that's all the program will print out (and no, it's not an option to print out a string instead). Suggestions for gcc or any other compiler would be helpful.

    Read the article

  • When to pass pointers in functions?

    - by yCalleecharan
    scenario 1 Say my function declaration looks like this: void f(long double k[], long double y[], long double A, long double B) { k[0] = A * B; k[1] = A * y[1]; return; } where k and y are arrays, and A and B are numerical values that don't change. My calling function is f(k1, ya, A, B); Now, the function f is only modifying the array "k" or actually elements in the array k1 in the calling function. We see that A and B are numerical values that don't change values when f is called. scenario 2 If I use pointers on A and B, I have, the function declaration as void f(long double k[], long double y[], long double *A, long double *B) { k[0] = *A * *B; k[1] = *A * y[1]; return; } and the calling function is modified as f(k1, ya, &A, &B); I have two questions: Both scenarios 1 and 2 will work. In my opinion, scenario 1 is good when values A and B are not being modified by the function f while scenario 2 (passing A and B as pointers) is applicable when the function f is actually changing values of A and B due to some other operation like *A = *B + 2 in the function declaration. Am I thinking right? Both scenarios are can used equally only when A and B are not being changed in f. Am I right? Thanks a lot...

    Read the article

  • ORDERBY "human" alphabetical order using SQL string manipulation

    - by supertrue
    I have a table of posts with titles that are in "human" alphabetical order but not in computer alphabetical order. These are in two flavors, numerical and alphabetical: Numerical: Figure 1.9, Figure 1.10, Figure 1.11... Alphabetical: Figure 1A ... Figure 1Z ... Figure 1AA If I orderby title, the result is that 1.10-1.19 come between 1.1 and 1.2, and 1AA-1AZ come between 1A and 1B. But this is not what I want; I want "human" alphabetical order, in which 1.10 comes after 1.9 and 1AA comes after 1Z. I am wondering if there's still a way in SQL to get the order that I want using string manipulation (or something else I haven't thought of). I am not an expert in SQL, so I don't know if this is possible, but if there were a way to do conditional replacement, then it seems I could impose the order I want by doing this: delete the period (which can be done with replace, right?) if the remaining figure number is more than three characters, add a 0 (zero) after the first character. This would seem to give me the outcome I want: 1.9 would become 109, which comes before 110; 1Z would become 10Z, which comes before 1AA. But can it be done in SQL? If so, what would the syntax be? Note that I don't want to modify the data itself—just to output the results of the query in the order described. This is in the context of a Wordpress installation, but I think the question is more suitably an SQL question because various things (such as pagination) depend on the ordering happening at the MySQL query stage, rather than in PHP.

    Read the article

  • Matching digits in Notepad++ extended search mode

    - by ketchup
    Notepad++'s manual is rather vague on the special character for numerical used in extended search mode. It says: \d### - Decimal value (between 000 and 255) but literally entering "\d###" doesn't match anything. What I am trying to do is to replace if VarA == 12 VarB = 1 with if VarA == 12 Var12=1 VarB=1

    Read the article

  • UID/username lookup on IBM z/os USS

    - by jgrump2012
    How can I associate a UID to a specific username on IBM z/OS Unix System Services? Within USS, I see content created in my user space which I do not own. File ownership lists a three digit numerical value, rather than a userid, which I presume to be a UID. I've unsuccessfully attempted to make a username association using commands: tsocmd "search class(USER) uid(###)" tsocmd "rlist unixmap u### all"

    Read the article

  • display values within stacked boxes of rowstacked histograms in gnuplot?

    - by gojira
    I am using gnuplot (Version 4.4 patchlevel 2) to generate rowstacked histograms, very similar to the example called "Stacked histograms by percent" from the gnuplot demo site at http://www.gnuplot.info/demo/histograms.html I want to display the values of each stacked box within it. I.e. I want to display the actual numerical value (in percent and/or the absolute number) of each box. How can I do that?

    Read the article

  • What tasks should be explicitly mentioned in a job reference? [closed]

    - by Martin
    Glossary A job reference (see also the german version) is a letter from the (former) employer that states what the employee did, and how well he did it. There are oh so weird rules here on how to phrase stuff therein, but this is not what this question is about. Question I hope this can even be generally answered, but even if country/region specific, I think there is enough international know-how on this site to get useful answers for different regions. I was wondering how detailed the tasks a programmer / developer did should be spelled out in a job reference. (After all, they can be spelled out in all detail in a CV when applying for a new job.) So how much detail is usual for a job reference? Example Developed Windows applications in C++ or Developed Windows Desktop Applications using C++ with MS Visual Studio 2005 and MFC, utilising Boost 1.47 and specif library xyz, focusing on subsystem abc for numerical calculations of ... etc. What makes more sense?

    Read the article

  • Numpad doesn't work after booting up - forced to reconnect USB keyboard after startup

    - by HorusKol
    I've tried this on two different USB keyboards - both of which work fine on a different computer running Windows XP. For some reason, the numerical keypad doesn't work probably immediately after booting up - neither the numbers work, nor the 'home' commands and so on that you can use with the numlock off. It doesn't make a difference whether I press numlock on or off - the keypad doesn't work correctly no matter what state this is in. However, once I've booted the machine I can disconnect/reconnect the USB connector for the keyboard, and it will work exactly as expected. I'm running Gnome on Ubuntu 10.04. The only other USB devices connected is a mouse - and I've experienced no problems with that. This is a direct connection to the box (not via an external USB hub)

    Read the article

  • How to specify which keys CapsLock affects?

    - by Seattle Jörg
    Using Maverick, I am not able to get the CapsLock behaviour I want: I would like it to affect essentially the alphabetical, numerical, and punctuation keys, i.e. all the keys that print something (as opposed to, say, the error keys), but only them. To illuminate this with an example: when writing code that uses % as the symbol for a comment, I want to be able to position the cursor at the start of a range of lines I want to comment out, then hit CapsLock, then iteratively hit the 5 key (using QWERTZ, Shift+5 gives %) and the arrow down key, so that I can quickly place a % at the start of the lines. Ubuntu in default configuration takes CapsLock literally, so that it affects only alphabetic keys. Under Preferences/Keyboard/Layout/Options I can make it act as a pressed Shift, but then the action of the arrow keys is to select text. All the other options available are equivalent to one of these two in my case. Is it possible to somehow get this behaviour? This is standard in Windows.

    Read the article

  • Avast Antivirus Crashes

    - by user67966
    Well I have installed avast anti virus on Ubuntu 12.04. But after updating, it crashes! So I have made some tweaks like below: 1) I pressed press Ctrl+Alt+T and opened Terminal. When it opened, I ran the command below. sudo gedit /etc/init.d/rcS 2) typed my password and hit enter 3) when the text file opens add the line: sysctl -w kernel.shmmax=128000000 4) made sure the line you added is before: exec /etc/init.d/rc S 5) This is how it should look like: Code: #! /bin/sh # rcS # # Call all S??* scripts in /etc/rcS.d/ in numerical/alphabetical order # sysctl -w kernel.shmmax=128000000 exec /etc/init.d/rc S 6) save it 7) Reboot My question is. Did I do anything wrong. I mean as I have made some tweaks,will it lower the security of avast down like viruses do! Please if you are a programmer check this if it contains bug or harmful intentions...Thanks.

    Read the article

  • Bug once in a while,but high priority

    - by Shirish11
    I am working on a CNC (computer numerical control) project which cuts shapes into metal with help of laser. Now my problem is once in a while (1-2 times in 20 odd days) the cutting goes wrong or not according to what is set. But this causes loss so the client is not very happy about it. I tried to find out the the cause of it by Including log files Debugging Repeating the same environment. But it wont repeat. A pause and continue operation will again make it to run smoothly with the bug reappearing. How do I tackle this issue? Should I state it as a Hardware Problem?

    Read the article

  • Getting to math applications gradually

    - by den-javamaniac
    I'm currently getting a formal degree related to computation, in particular my current focus is numerical programming, scientific computing and machine learning. I'd love to apply that knowledge in game dev and expand it with statistics, probability theory, and graph theory (probably even linear algebra). The question is: which spheres of gamedev are filled with such math stuff, is it possible to advance in those without being a part of a group of people and how to get to it gradually? P.S.: I've got experience with commercial java dev and am getting my hands on C/C++ at the moment, however, I'm opened to go ahead and try Unity3D and etc.

    Read the article

  • HTG Explains: What is DNS?

    - by Chris Hoffman
    Did you know you could be connected to facebook.com – and see facebook.com in your web browser’s address bar – while not actually being connected to Facebook’s real website? To understand why, you’ll need to know a bit about DNS. DNS underpins the world wide web we use every day. It works transparently in the background, converting human-readable website names into computer-readable numerical IP addresses. Image Credit: Jemimus on Flickr How To Switch Webmail Providers Without Losing All Your Email How To Force Windows Applications to Use a Specific CPU HTG Explains: Is UPnP a Security Risk?

    Read the article

  • What classes are useful for an aspiring software developer? [closed]

    - by Anonymouse
    I'm a freshman in college trying to graduate in 3 years with a Math/CS dual major, and I don't have a lot of time to be fooling around with useless classes. I've tested out of most of my gen eds and science-y courses, but I need to know: what math and cs courses are most important for someone interested in algorithm development? Math courses already taken: Calc I-III,Linear Algebra, Discrete Math. CS courses taken: Java. Math courses I'm planning to take: ODE, Linear Algebra II, Vector calc, Logic, (Analysis or Algebra), Stats, probability CS courses I'm planning to take: C(required), Data Structures, Numerical Methods, Intro to Analysis of Algorithms. Which is better, analysis or algebra? Did I take enough CS courses? Am I missing out on anything? Thanks.

    Read the article

  • Is this fix for Avast Antivirus crashing safe to use?

    - by TmRn
    Well I have installed avast anti virus on Ubuntu 12.04. But after updating, it crashes! So I have made some tweaks like below: Press Ctrl+Alt+T to open the Terminal. When it opens, run the command below. sudo gedit /etc/init.d/rcS Type your password and hit Enter. When the text file opens, add the line: sysctl -w kernel.shmmax=128000000 Make sure the line you added is before: exec /etc/init.d/rc S This is what it should look like: #! /bin/sh # rcS # # Call all S??* scripts in /etc/rcS.d/ in numerical/alphabetical order # sysctl -w kernel.shmmax=128000000 exec /etc/init.d/rc S Save the file. Reboot. My question is: Did I do anything wrong? I mean as I have made some tweaks, will it lower the security of Avast down like viruses do? Please if you are a programmer check this if it contains bug or harmful intentions... Thanks.

    Read the article

  • A c++ program that computes the min and max of f(x) for a rectangle inputed by user

    - by StreetBallerX
    So bassicly this is the problem quoted from my teacher : "You have to write a program in C++ that computes the minimal and the maximal value of function f(x,y) obtained on an integer point in a given rectangle [a, b] x [c, d]. Your program should prompt the user to input numerical values of a, b, c and d, as floating point numbers, which are expected to be in a range from -100 thru 100. In case when minimal or maximal values do not exists, your program should output appropriate messages. f(x,y)=x+x*x+x*x*x+y+y*y " So before anyone tell me that i should try do it myself , i'll tell them that ive been trying to do it myself for the past 8 days but my deadline is aproaching and i just cant figure it out its a really simple program but i just cant understand it ... I wont post my attempts because all i saw in these forums is that when someone posts their try and a milion people start to say dont look it this way thry this and bla bla and the guy who posted it was just wondering for minor thing ... so what ever thank you all in advance and thats it :)

    Read the article

  • Running response time tests on php code - how much is 7.2E-5 microseconds?

    - by Ali
    Hi guys I'm using microtime() function of php to tell how long certain snippets of code take to run I do this by taking the time before and after the snippet and subtracting them using microtime function. I got the following results though for the different snippets: 1 - 0.022976 2 - 0.003656 3 - -0.196361 4- 0.006563 5- 7.2E-5 6- 0.847695 7- 0.005092 8- 7.6E-5 9- 0.08024 The first numbers represent the snippt and the following the time taken... I've forgotten whatever I learnt back in College on numerical methods :( - how big is 7.2E-5 microseconds?

    Read the article

  • iPhone virtual keyboard bug

    - by Chandan Shetty SP
    In iPhone virtual keyboard... 1.Change the alphabetical keypad view to numerical view. 2.Tap on the single quote(') button the view changes to alphabetical. 3.In this view tapping on space twice displays a fullstop. I don't know whether it is apple bug or feature, How to fix this issue through coding? Thanks,

    Read the article

  • Python to MATLAB: exporting list of strings using scipy.io

    - by user292461
    I am trying to export a list of text strings from Python to MATLAB using scipy.io. I would like to use scipy.io because my desired .mat file should include both numerical matrices (which I learned to do here) and text cell arrays. I tried: import scipy.io my_list = ['abc', 'def', 'ghi'] scipy.io.savemat('test.mat', mdict={'my_list': my_list) In MATLAB, I load test.mat and get a character array: my_list = adg beh cfi How do I make scipy.io export a list into a MATLAB cell array?

    Read the article

  • Cassandra: Using LongType

    - by TheDeveloper
    I'm trying to insert data into a ColumnFamily with "CompareWith" attribute "LongType". However, when trying to insert data under numerical keys, I get a thrift error. When attempting the same operation with the cassandra-cli program, I get the error "A long is exactly 8 bytes". How can I resolve this? Should I use a different comparison type? Thanks

    Read the article

  • display values within stacked boxes of rowstacked histograms in gnuplot?

    - by gojira
    I am using gnuplot (Version 4.4 patchlevel 2) to generate rowstacked histograms, very similar to the example called "Stacked histograms by percent" from the gnuplot demo site at http://www.gnuplot.info/demo/histograms.html I want to display the values of each stacked box within it. I.e. I want to display the actual numerical value (in percent and/or the absolute number) of each box. How can I do that?

    Read the article

  • how to set tab order in jquery

    - by Martin Ongtangco
    Hello, I'm using Telerik controls, specifically the numerical textbox where you can set a up-down arrow to increment/decrement values in a textbox. I am required to set the tab order to move to the next field but since there's a button on the up-down arrow, the browser will go through those buttons first then move to the next textbox field. How do you set the jquery to detect the next visible textbox/dropdown/etc input field and move to that on pressing the tab button instead of running through the buttons near it?

    Read the article

  • Weird Java Math ,10 ^ 1 = 11?

    - by Simon
    For an exercise I was writing a loop that turns a string into an integer without using the built in functions by multiplying each individual value by its numerical position. 75 would be 7*(10 ^ 1) + 5*(10 ^ 0), for example. However, for some reason (10 ^ 1) keeps coming back as 11. Is there some mistake I have made or an explanation for this?

    Read the article

  • Need to validate a scientific spreadsheet written in Java

    - by geejay
    I need a validation framework, for an app written in Java, Eclipse RCP. The UI is a simple spreadsheet with many input fields and many output fields. The user input needs to be validated, for example: Thresholds for numerical fields Required fields for certain operations Context-sensitive help based on the validation results Multi-field validation, e.g a field is valid depending upon the values in other fields Wondering if there is anything out there?

    Read the article

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