Search Results

Search found 4514 results on 181 pages for 'totally newbie'.

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

  • A Newbie question regarding Software Development

    - by Sharif
    Hi, I'm going to complete my B.pharm (Hons.) degree and, you know, I don't have much knowledge about programing. I was wondering to build a software on my own. Could you guys tell me what to learn first for that? Is it too hard for a student of other discipline to build a software? Let me know please. The software I want to make is like a dictionary (or more specifically like "Physician's Desk Reference"). It should find the generic name, company name, indication, price etc. of a drug when I enter the brand name and vice versa. To build a software like that what programing language could help me most and what (and how many) language should I learn first? In my country, there is no practice of Community pharmacy (most of the pharmacy stores are run by unskilled people), that's why this type of thing could help them sell drugs. Would you please tell me what I'm to do and how tough it is? I'm very keen to learn programming. Thanks in advance NB: I started this post in ASKREDDIT section but it seems that was not the right place for poll type question, so I post it again in this section

    Read the article

  • JTabbedPane: only first tab is drawn, the second is always empty (newbie Q)

    - by paul
    I created a very simple JTabbedPane by first creating an empty JTabbedPane object, then 2 JPanels that I later add. Each JPanel is holding a object that extends JButton and implements MouseListener. Each of these holds a different image loaded from a file; the image is held locally as a buffered image and as an image icon, etc., all of which works great. The point of all that is to allow resizing of the image when the button is resized (using getscaledinstance()), because the panel is resized, because the JTabbedPane is resized, etc., within the JFrame that holds everything. I override paintComponent() to accomplish this in the class that extends JButton. I am using MigLayout Manager, and all is well on that front controlling layout constraints, growing, filling, initial sizes, preferred sizes, etc. The images the buttons hold are of different sizes and proportions, but this caused no trouble before. Up until 2 days ago everything worked fairly well. I made some changes trying to tweak some resizing issues as I was picking up MigLayout manager. At the time I was playing around with setting various min, max, and preferred sizes using the methods provided for by the components, not the layout manager. I also fooled a bit with pack(), validate(), visible(), opaque() etc., and yes I read the article about Swing and AWT painting here: http://java.sun.com/products/jfc/tsc/articles/painting/ , and I switched to relying more and more on MigLayout. On an unrelated note, it appears JFrame's do not honor maxsize? Somehow, today, with and without using any of these methods provided by swing, with or without using MigLayout manager to handle some of these matters instead, I now have a JTabbedPane that correctly displays the FIRST JPanel I add, but NOT THE SECOND JPanel--which, while present as a tab--does not show when selected. I have switched the order of which panel is added first, and this still holds true regardless of which JPanel I add first, telling me the JPanels are ok, and the problem is most likely in the JTabbedPane. I click on the second tab, the JTabbedPane switches, but I have what appears to be a blank button in the JPanel. A few console system-out statements reveal the following: a) that the second panel and its button are constructed b) no mouse events are being captured when I click on where the second panel and button should reside, as if it didn't exist at that point; c) when I switch to the second tab, the overrided paintComponent() method of the button within that second JPanel is never called, so it is in fact never being painted despite the tab in which it resides becoming visible; d) the JTabbpedPane getComponentCount() returns a correct value of 2 after adding the 2nd panel; e) MigLayout manager actually rocks, but I digress... I cannot now revert to my older code, and despite my best efforts to undo whatever changes caused this, I cannot fix my new problem. I've commented out everything but the most essential calls: constructors for each object--with MigLayout; add() for placing the buttons on the panels using string-arguments appropriate for MigLayout; add() for placing the panels on the JTabbedPane, also with MigLayout string arguments; setting the default op on close for the JFrame; and setting the JFrame visible. This means I do not fiddle with optimization settings, double buffering settings, opaque settings, but leave them as default, and still, no fix; the second panel will not show itself. Each panel, I should add, when it is the first to be loaded, works fine, again re-affirming that the panels and buttons are themselves ok. Here is part of what I am doing: //Note: BuildaButton is a class that merely constructs my instances File f = new File("/foo.jpg"); button1 = new BuildaButton().BuildaButton(f).buildfoo1Button(); f = new File("/foo2.jpg"); button2 = new BuildaButton().BuildaButton(f).buildfoo2Button(); MigLayout ml = new MigLayout("wrap 1", "[fill, grow]0[fill, grow]", "[fill, grow]0[fill, grow]"); MigLayout ml2 = new MigLayout("wrap 2", "[fill, grow]5[fill, grow]", "[fill, grow]0[fill, grow]"); foo1panel = new JPanel(ml); foo1panel.add(button1, "w 234:945:, h 200:807:"); foo2panel = new JPanel(ml); foo2panel.add(button2, "w 186:752:, h 200:807:"); tabs.add("foo1", foo1panel); tabs.add("foo2", foo2panel); System.out.println("contents of tabs: " + tabs.getComponentCount() + " elements"); mainframe.setLayout(ml2); mainframe.setMinimumSize(new Dimension(850,800)); mainframe.add(tabs, "w 600:800:, h 780:780:"); //controlpanel is a still blank jpanel that holds nothing--it is a space holder for now & will be utilized mainframe.add(controlpanel, "w 200:200:200, h 780:780:"); mainframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); mainframe.setVisible(true); Thank you in advance for any help you can give.

    Read the article

  • Newbie C# Question about float/int/text type formatting

    - by user563501
    Hey everybody, I'm a total C# newb with a light (first year CS) background in Python. I wrote a console program in Python for doing marathon pace running calculations and I'm trying to figure out the syntax for this in C# using Visual Studio 2010. Here's a chunk of what I've got so far: string total_seconds = ((float.Parse(textBox_Hours.Text) * 60 * 60) + (float.Parse(textBox_Minutes.Text) * 60) + float.Parse(textBox_Seconds.Text)).ToString(); float secs_per_unit = ((float)(total_seconds) / (float)(textBox_Distance.Text)); float mins_per_unit = (secs_per_unit / 60); string pace_mins = (int)mins_per_unit.ToString(); string pace_secs = (float.Parse(mins_per_unit) - int.Parse(mins_per_unit) * 60).ToString(); textBox_Final_Mins.Text = pace_mins; textBox_Final_Secs.Text = pace_mins; Imagine you have a running pace of 8 minutes and 30 seconds per mile. secs_per_unit would be 510, mins_per_unit would be 8.5. pace_mins would simply be 8 and pace_secs would be 30. In Python I'd just convert variables from a float to a string to get 8 instead of 8.5, for example; hopefully the rest of the code gives you an idea of what I've been doing. Any input would be appreciated.

    Read the article

  • need help with Java solution /newbie

    - by Racket
    Hi, I'm new to programming in general so i'm trying to be as specific as possible in this question. There's this book that i'm doing some exercises on. I managed to do more than half of what they say, but it's just one input that I have been struggling to find out. I'll write the question and thereafter my code, "Write an application that creates and prints a random phone number of the form XXX-XXX-XXXX. Include the dashes in the output. Do not let the first three digits contain an 8 or 9 (but don't be more restrictive than that), and make sure that the second set of three digits is not greater than 742. Hint: Think through the easiest way to construct the phone number. Each diigit does not have to be determined separately." OK, the highlighted sentence is what i'm looking at. Here's my code: import java.util.Random; public class PP33 { public static void main (String[] args) { Random rand = new Random(); int num1, num2, num3; num1 = rand.nextInt(900) + 100; num2 = rand.nextInt(643) + 100; num3 = rand.nextInt(9000) + 1000; System.out.println(num1+"-"+num2+"-"+num3); } } How am I suppose to do this? I'm on chapter 3 so we have not yet discussed if statements etcetera, but Aliases, String class, Packages, Import declaration, Random Class, Math Class, Formatting output (decimal- & numberFormat), Printf, Enumeration & Wrapper classes + autoboxing. So consider answer the question based only on these assumptions, please. The code doesn't have any errors. Thank you!

    Read the article

  • Newbie Question: Read and Process a List of Text Files

    - by johnv
    I'm completely new to .NET and am trying as a first step to write a text processing program. The task is simple: I have a list of 10,000 text files stored in one folder, and I'm trying to read each one, store it as a string variable, then run it through a series of functions, then save the final output to another folder. So far I can only manage to manually input the file path like this (in VB.NET): Dim tRead As System.IO.StreamReader Public Function ReadFile() As String Dim EntireFile As String tRead = File.OpenText("c:\textexample\00001.txt") EntireFile = tRead.ReadToEnd Return EntireFile End Function Public Function Step1() ..... End Function Public Function Step2() ..... End Function .............. I'm wondering, therefore, if there's a way to automate this process. Perhaps for example store all input file path into a text file then read each entry at a time, then save the final output into the save path, again listed in a text file. Any help is greatly appreciated. ReplyQuote

    Read the article

  • Newbie question on MvcContrib TestHelpers

    - by Simon Lomax
    Hi, I'm just starting to use the TestHelpers in MvcContrib. I want to try and test an action method on my controller that itself tests if IsAjaxRequest() is true. I've used the same code that is shown in the TestHelper samples to set up the TestControllerBuilder _controller = new StarsController(); _builder = new TestControllerBuilder(); _builder.InitializeController(_controller); So that _controller has all the faked/mocked HttpContext inside it, which is really great. But what do I do now to force IsAjaxRequest() on the internally faked Request object to return true?

    Read the article

  • Best C# Tutorials for a newbie?

    - by N00b
    Were there any awesome C# tutorials you found that helped you learn it? Or any books that you thought were particularly successful? Any that should be avoided? UPDATE: Tons of good answers, thank you all! To clarify the earlier question, hobbyist with only light programming experience previous. Working through online tutorials currently, probably going to pick up Head First C#.

    Read the article

  • jQuery arrays - newbie needs a kick start

    - by Jonny Wood
    I've only really started using this site and alredy I am very impressed by the community here! This is my third question in less than three days. Hopefully I'll be able to start answering questions soon instead of just asking them! I'm fairly new to jQuery and can't find a decent tutorial on Arrays. I'd like to be able to create an array that targets several ID's on my page and performs the same effect for each. For example I have tabs set up with the following: $('.tabs div.tab').hide(); $('.tabs div:first').show(); $('.tabs ul li:first a').addClass('current'); $('.tabs ul li a').click(function(){ $('.tabs ul li a').removeClass('current'); $(this).addClass('current'); var currentTab = $(this).attr('href'); $('.tabs div.tab').hide(); $(currentTab).show(); return false; }); I've used the class .tag to target the tabs as there are several sets on the same page, but I've heard jQuery works much faster when targetting ID's How would I add an array to the above code to target 4 different ID's? I've looked at var myArray = new Array('#id1', 'id2', 'id3', 'id4'); And also var myValues = [ '#id1', 'id2', 'id3', 'id4' ]; Which is correct and how do I then use the array in the code for my tabs...?

    Read the article

  • Multiple layouts in rails [Newbie Q]

    - by BriteLite
    Hi. As a newb, I decided to build a "home inventory" application. I am now stuck on how to programmatically select a layout based on what type of item it is when viewing it in a browser. According to my planning, so far I should have created a few models to represent types of items I can find in my home: Furniture, Electronics and Books. class Book < ActiveRecord::Base end class Furniture < ActiveRecord::Base end class Electronic < ActiveRecord::Base end Now the Books model has things like isbn, pages, address, and category. Furniture model has things like color, price, address, and category. Electronics has things like name, voltage, address, and category. Here is where I got confused. I know the property address is going to be the same for all of them. I also know that, I will need to create multiple "layouts" for 3 different types of items to show the different properties of said items with appropriate graphics and stylesheets. But how will I go about deciding which category the item is so I can determine which layout to render. According to me, this is how I will do it: class DisplayController < ApplicationController def display @item = Params[:item] if @item.category = "electronics" render :layout => 'electronics' end end In my routes.rb map.display ':item', :controller => 'display', :action => 'display' I only seem to have one concern with this, I probably will add a lot of categories later on and think there should be a more DRY-esque way of dealing, rather than hardcoding them. I understand that I need to add into my layout html tags to display relevant information for that particular category. ----Questions---- Is this the right way to approach this type of problem. Will this approach be compatible when I decide to add a gem like *thinking_sphinx* to run search. What issues do you see with my approach and how can I make it better. I was reading something about "Polymorphic Assoc", does that apply in this case, since category exist for all items? Also, I was trying to get a routes to render a URL like "http://localhost/living-room-tv"

    Read the article

  • Java EE - newbie question (not related to learning JEE)

    - by UnCon
    I've read lot of articles saying, that Java EE is most popular enterprise solution nowadays. Let's not argue if it is most popular or second most popular or what. The thing is : I see almost all web pages with extension like .html, .php and .aspx. Why there is (almost) none .JSP ? Why so ease to find ASP.NET pages if it is supposed to be less popular? Please I am not programming with Java EE (yet) so don't blame me, if I am completely wrong. The answer with patience would be greatly appreciated!

    Read the article

  • Infinite loop in haskell? (newbie)

    - by Mike
    I'm just learning Haskell. I thought this would produce a factorial function... (within ghci) Prelude let ft 0 = 1 Prelude let ft n = n * ft (n - 1) Prelude ft 5 (hangs indefinitely, until ^C). Can someone point me in the right direction? Thanks!

    Read the article

  • iPhone memory management, a newbie question

    - by Reuven
    Hi, I've seen in (Apple) sample code two types of ways of allocation memory, and am not sure I understand the difference and resulting behavior. // FAILS NSMutableArray *anArray = [NSMutableArray array]; [anArray release]; // WORKS NSMutableArray *anArray1 = [[NSMutableArray alloc] init]; [anArray release]; By "FAILS" I mean I get crashes/runtime warnings etc., and not always as soon as I call the release... Any explanation appreciated. Thanks

    Read the article

  • Newbie : installing and upgrading python module.

    - by iamgopal
    I have downloaded and install a python library, via setup.py , python2.5 setup.py install ... now the version is changed at the source . a newer library is available. originally , i have clone it via mercurial, and install it. right now , i have updated repository. how do i use the newer version ? overwrite the installation ? by simply doing setup.py install again ?

    Read the article

  • Oracle Forms 6i master-detail question from a painfully new newbie

    - by Murasaki
    Hello, I have a form that contains 3 blocks (block a, b, c). There is a master-detail relationship between b (detail) and c (master). Data-flow: you enter an ID in block a, which in turn populates block c and corresponding details in block b. Control goes immediately to block c. Objective: I need to be able to update details of block b. Issue: I cannot navigate to block b. Keep in Mind: --In the Property Palette Keyboard Navigable is set to "Yes" --Insert Allowed and Update Allowed are set to "Yes." If someone could respond ASAP I would really appreciate it. Thank you.

    Read the article

  • Java Newbie can't do simple Math, operator error

    - by elguapo-85
    Trying to do some really basic math here, but my lack of understanding of Java is causing some problems for me. double[][] handProbability = new double[][] {{0,0,0},{0,0,0},{0,0,0}}; double[] handProbabilityTotal = new double[] {0,0,0}; double positivePot = 0; double negativePot = 0; int localAhead = 0; int localTied = 1; int localBehind = 2; //do some stuff that adds values to handProbability and handProbabilityTotal positivePot = (handProbability[localBehind][localAhead] + (handProbability[localBehind][localTied] / 2.0) + (handProbability[localTied][localAhead] / 2.0) ) / (handProbabilityTotal[localBehind] + (handProbability[localTied] / 2.0)); negativePot = (handProbability[localAhead][localBehind] + (handProbability[localAhead][localTied] / 2.0) + (handProbability[localTied][localBehind] / 2.0) ) / (handProbabilityTotal[localAhead] + (handProbabilityTotal[localTied] / 2.0)); The last two lines are giving me problems (sorry for their lengthiness). Compiler Errors: src/MyPokerClient/MyPokerClient.java:180: operator / cannot be applied to double[],double positivePot = ( handProbability[localBehind][localAhead] + (handProbability[localBehind][localTied] / 2.0) + (handProbability[localTied][localAhead] / 2.0) ) / (handProbabilityTotal[localBehind] + (handProbability[localTied] / 2.0) ); ^ src/MyPokerClient/MyPokerClient.java:180: operator + cannot be applied to double, positivePot = ( handProbability[localBehind][localAhead] + (handProbability[localBehind][localTied] / 2.0) + (handProbability[localTied][localAhead] / 2.0) ) / (handProbabilityTotal[localBehind] + (handProbability[localTied] / 2.0) ); ^ src/MyPokerClient/MyPokerClient.java:180: operator / cannot be applied to double, positivePot = ( handProbability[localBehind][localAhead] + (handProbability[localBehind][localTied] / 2.0) + (handProbability[localTied][localAhead] / 2.0) ) / (handProbabilityTotal[localBehind] + (handProbability[localTied] / 2.0) ); Not really sure what the problem is. You shouldn't need anything special for basic math, right?

    Read the article

  • Connecting to an MQ: Newbie question

    - by deltamatrix
    Hi, I am a novice with Websphere MQ and require some novice help. I am using Websphere MQ Explorer to connect to a queue but do not know how to write the connection string. I have all the details (host, port, channel, queue manager name) but do not know how to put them together correctly as a connection string. Can any help this novice? Thanks

    Read the article

  • C newbie malloc question

    - by roufamatic
    Why doesn't this print 5? void writeValue(int* value) { value = malloc(sizeof(int)); *value = 5; } int main(int argc, char * argv) { int* value = NULL; writeValue(value); printf("value = %d\n", *value); // error trying to access 0x00000000 } and how can I modify this so it would work while still using a pointer as an argument to writeValue?

    Read the article

  • Help a newbie with a PHP Function

    - by danit
    I want to use this function: http://www.frankmacdonald.co.uk/php/post-to-wordpress-with-php.html Its used to post to Wordpress using XMLRPC, can anyone give me the basics for using this function and maybe a brief over view? I want to learn how functions work and how to use them.

    Read the article

  • Newbie question about file formatting in Python

    - by user568041
    I'm writing a simple program in Python 2.7 using pycURL library to submit file contents to pastebin. Here's the code of the program: #!/usr/bin/env python2 import pycurl, os def send(file): print "Sending file to pastebin...." curl = pycurl.Curl() curl.setopt(pycurl.URL, "http://pastebin.com/api_public.php") curl.setopt(pycurl.POST, True) curl.setopt(pycurl.POSTFIELDS, "paste_code=%s" % file) curl.setopt(pycurl.NOPROGRESS, True) curl.perform() def main(): content = raw_input("Provide the FULL path to the file: ") open = file(content, 'r') send(open.readlines()) return 0 main() The output pastebin looks like standard Python list: ['string\n', 'line of text\n', ...] etc. Is there any way I could format it so it looks better and it's actually human-readable? Also, I would be very happy if someone could tell me how to use multiple data inputs in POSTFIELDS. Pastebin API uses paste_code as its main data input, but it can use optional things like paste_name that sets the name of the upload or paste_private that sets it private.

    Read the article

  • Java Enum Newbie Question

    - by ikurtz
    i have a situation where i need the Checker enum below used in multiple classes: package Sartre.Connect4; public enum Checker { EMPTY, RED, YELLOW } so i put the Checker in a Checker.java file and then from the classes that need it i simply do the following: example: public Cell(){ currentCell = Checker.EMPTY; } example: public Cell(Checker checker){ currentCell = checker; } and the code compiles fine and runs fine also. so what is my question? well being new to Java i am just wondering if the way i use Checker without encapsulating it in a class is a sound implementation? it may be because of The enum declaration defines a class (called an enum type). as noted in Java docs enum tutorial page. thank you for your insight into this matter.

    Read the article

  • Help! I'm a Haskell Newbie

    - by Darknight
    I've only just dipped my toe in the world of Haskell as part of my journey of programming enlightenment (moving on from, procedural to OOP to concurrent to now functional). I've been trying an online Haskell Evaluator. However I'm now stuck on a problem: Create a simple function that gives the total sum of an array of numbers. In a procedural language this for me is easy enough (using recursion) (c#) : private int sum(ArrayList x, int i) { if (!(x.Count < i + 1)) { int t = 0; t = x.Item(i); t = sum(x, i + 1) + t; return t; } } All very fine however my failed attempt at Haskell was thus: let sum x = x+sum in map sum [1..10] this resulted in the following error (from that above mentioned website): Occurs check: cannot construct the infinite type: a = a -> t Please bear in mind I've only used Haskell for the last 30 minutes! I'm not looking simply for an answer but a more explanation of it. Thanks in advanced.

    Read the article

  • Newbie question attribute from associated table not showing up in index view

    - by Lauren
    Hi I know this is something simple I am doing wrong. I have three tables, installation, neighborhood, schools Installation: has_many :schools has_many :neighborhoods Neighborhood: has_many :installations has_many :schools Schools: belongs_to :installations belongs_to :neighborhoods I can't figure out how to show the name of the neighborhood the school is located in on the index view. I can get it to show on the show view once I have the school id. But on the index view I can't figure out what to put in the controller that will allow me to access the neighborhood name from the neighborhood_id that is in the School model. I am sure this is so easy and I am screwing up something stupid. HELP!

    Read the article

  • Html newbie! background-image question

    - by Kevin Li
    Hi! I'm learning HTML and I wanted to practice by recreating a invoice sent to me by Electronics Expo. However, I used the background-image property and repeated it by repeat-x and now, the background stretches across the page so much that it has a horizontal bar to drag. http://htmlpocketreference.110mb.com/index.html You can see what I did in my link above. Also, I would really appreciate some advice on simplifying my CSS coding. It seems really messy and I have to move every element once something changes. -.- Thanks!

    Read the article

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