Search Results

Search found 3184 results on 128 pages for 'beginning'.

Page 5/128 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Beginning with Datampper, Association question

    - by Ian
    I'm just diving into Datamapper (and Sinatra) and have a question about associations. Below are some models I have. This is what I want to implemented. I'm having an issue with Workoutitems and Workout. Workout will be managed separately, but Workoutitems has a single workout associated with each row. Workout - just a list of types of workouts (run, lift, situps, etc) Selected workout - this is the name of a set of workouts, along with notes by the user and trainer. It has a collection of N workoutitems Workoutitems - this takes a workout and a number of repetitions to it that go in the workout set. class Workout include DataMapper::Resource property :id, Serial #PK id property :name, String, :length=50,:required=true # workout name property :description, String, :length=255 #workout description end class Selectedworkout include DataMapper::Resource property :id, Serial property :name, String, :length=50, :required=true property :workout_time, String, :length=20 property :user_notes, String, :length=255 property :coach_notes, String, :length=255 has n, :workoutitems end class Workoutitem include DataMapper::Resource property :id, Serial property :reps, String, :length=50, :required=true belongs_to :selectedworkout end

    Read the article

  • Need help with displaying the message correctly in the pole display always starting at the beginning

    - by SA
    Hi, I am using an HP RS232 pole display with the following setting: Char type: USA/Europe (default) Command mode: EPSON (default) Baud rate: 9600, n , 8, 1 (default?) Passthru None (Default) Here's the code using System.IO.Ports; private SerialPort port; port = new SerialPort("COM2", 9600, Parity.None, 8, StopBits.One); port.Handshake = Handshake.None; Port.WriteLine("Welocome to something something"); It has 2 lines consisting of 20 characters each with a total of 40 characters. I have no control how and where the characters get displayed. I would like it to always begin on line 1 position 1 but as I said earlier how would I be able to do that. The same program if I run again and again it moves a character to the left. I have set it to accept ASCII char set and so I am able to type as is visble in the Writeline message

    Read the article

  • Beginning python for the web

    - by Josh K
    I'm looking for a nice tutorial or framework for developing Python written web applications. I've done lots in PHP, but very little in Python or Ruby and figured I'd start with the first one alphabetically.

    Read the article

  • replacing the beginning and end but not the same chars within a string

    - by Jordan Trainor
    lines = "some stuff\"some other \"stuff\"\""; lines = lines.Replace("\"", "\""); lines = lines.Replace("\"", "\""); in its current context and in its simplest form these two actions seem absolutely pointless but when I put this into code it will be not be pointless and will have a purpose other than replacing itself with itself. OK so I have the String lines that has 4 escaped quotation marks and I wish to replace the first quote with a quote and the end quote with a quote how would I accomplish this without replacing any of the inner quotes?

    Read the article

  • Questions to ask a client before beginning a website

    - by Jason
    I am aware of this question which deals with the technical aspects of website construction, but I was unable to find any place with suggestions on knowledge you must obtain from a client before undergoing a project. As someone who freelances on the side, I think this could be incredibly useful. What important questions must one ask the client (and require an answer to) before undergoing a website? or, in other words, What must you know about the project before starting it? This can range from "When do I get paid?" to "How many pages will the site be?". I believe this is relevant to programming because you must know how to communicate with your client to get all the information necessary before you can begin programming. If not, downstream changes can put a serious delay on the project from things not hashed out beforehand. Thanks!

    Read the article

  • Beginning PHP for someone interested in Security

    - by MaXX
    I'd like to learn PHP specifically for dealing with security vulnerabilities/exploits. Could someone recommend a book? I don't know if I need to learn HTML/CSS/XML/XHTML etc, do I have to learn those too? I don't really plan on designing websites, could anyone help me with this? :P

    Read the article

  • Do I have to start from beginning?

    - by Knowing me knowing you
    If I have: std::size_t bagCapacity_ = 10; std::size_t bagSize = 0; A** bag = new A*[bagCapacity_]; while (capacity--) { bag[capacity] = new A(bagSize++);//**here I'm loading this array from the end is it ok?** } And also can I delete those object from starting at the end of the array? while(capacity--) { delete bag[capacity]; } Question in a code.

    Read the article

  • Timer not beginning from 00:00

    - by studentProgrammer
    I have a Game in which there is a timer involved. For each two minutes that passes a new round between different players begins. So, I have a text box starting from 00:00 and changes each second until it is equal to 02:00. Now, I want to save the state of the game in the middle of a round if the user closes the form. What I need to do is that upon loading, the textbox starts at the time that the user left the game the last time and continue up till 02:00 normally. How can I do this? This is what I have until now where Tournament is the Form public Tournament() { _timer = new System.Windows.Forms.Timer(); _timer.Interval = 1000; _timer.Tick += Timer_Tick; _myDateTime = DateTime.Now; newDate = new DateTime(); newDate = newDate.AddMinutes(2.00); _timer.Start(); InitializeComponent(); } void Timer_Tick(object sender, EventArgs e) { var diff = DateTime.Now.Subtract(_myDateTime); this.textBox1.Text = diff.ToString(@"mm\:ss"); DateTime dt = Convert.ToDateTime(diff.ToString()); if (newDate.Minute == dt.Minute) { _timer.Stop(); _myDateTime = DateTime.Now; displayPointsOrResults(); this.textBox1.Text = diff.ToString(@"mm\:ss"); } } In my LoadGame method: where timePassed is what I have written in the text box string[] splitted6 = timePassed.Split(':'); if (splitted6[0] == "00") { int remainingTime = 120 - Convert.ToInt32(splitted6[1]); DateTime time = DateTime.Now.Date; time = time.AddMinutes(remainingTime); _myDateTime = time; } else { int leftTime = Convert.ToInt32(splitted[0].Trim('0') + splitted[1]); int remainingTime = 120 - leftTime; DateTime time = DateTime.Now.Date; time = time.AddMinutes(remainingTime); _myDateTime = time; }

    Read the article

  • trying to switch beginning of an array with another

    - by user1874574
    I have a problem where i am trying to swap two arrays so that they switch beginnings. example: array 1 = (1,2,3,4,5,6,7,8) and array 2 = (11,12,13,14,15,16,17,18) i want to end up with the first array being (11,12,13,14,5,6,7,8) and i want the second array to be (1,2,3,4,15,16,17,18) but for some reason i end up with 1=(11,12,13,14,5,6,7,8) and 2=(11,12,13,14,15,16,17,18) my code is provided below, what am i doing wrong? public static void Mutate(Genetic lowest, Genetic secondLowest) { int halfway = (lowest.getPopulation().length)/2; int[] one = lowest.getPopulation(); int[] two = secondLowest.getPopulation(); int[] temp = secondLowest.getPopulation(); int[] temp2 = lowest.getPopulation(); for(int i = 0; i < halfway; i++){ temp[i] = one[i]; } lowest.setPopulation(temp); for(int i = 0; i < lowest.getPopulation().length; i++){ System.out.print(temp[i]); } System.out.println(); for(int i = 0; i < halfway; i++){ temp2[i] = two[i]; } for(int i = 0; i < lowest.getPopulation().length; i++){ System.out.print(temp2[i]); } }

    Read the article

  • xpath find if node exists

    - by EddyR
    Using a xpath query how do you find if a node (tag) exists at all? For example if I needed to make sure a website page has the correct basic structure like /html/body and /html/head/title

    Read the article

  • Getting started with open source

    - by lola
    Hi all, I'm an undergraduate who has decided that he wants to join the open source community and contribute. However, I have come to think that, once you have chosen an open source project, a lot of time is spent in learning the nitty gritties of that project in addition to stuff like subversion,etc which a typical undergraduate isn't exposed to. So, you have to stick with that project for a long time, say a year or two, before moving on to other projects. In this case, choosing the right(for you) initial project is very important since if you choose one,and say, the development in your field of interest(in that project) is a low priority and not exciting enough, you'll lose interest and stop contributing to open source all together. So what I wanted to know was, since there are thousands of open source projects, is all this being documented somewhere with tags,etc so that a beginner can choose his projects. The GSoc 2010 ideas list is a great starting point, but it only covers a handful. Hence, I thought why not ask this at stackoverflow: if you have any pointers as to where to start, when choosing a FOSS project or any other tips related to starting with FOSS. P.S. I'm interested in projects involving mobile ad hoc networks(those using TinyOS, preferably), so pointers related to these will be great. I'm looking through Freifunk and OLPC as of now, needed more ideas.

    Read the article

  • Beginner's book

    - by Aymen
    Hi I'm wanna learn C++ and i'm going to buy one of these books : Accelerated C++ Programming: Principles and Practice Using C++ Wich one do you consider more appropriate for me ? And is it worth it that I buy both of them ? PS: I'm not new to programming, I already have a good experience with Java and Scala. Thank you !

    Read the article

  • How to add a custom shape in the beginning of terminal command-prompt?

    - by Naruto
    I have seen a lot of terminal with sweet shape in the beginning of terminal command-prompt, like this: and i want to add a shape like this : .....____________________ , ,__ ....../ `---___________----_____] - - - - - - - - ¦ ¦¦¦¦D ...../_==o;;;;;;;;_______.:/ .....), ---.(_(__) / ....// (..) ), ----" ...//___// ..//___// .//___// i know how to change text color and add a character at the end, but when i add the brev shape it give me an error when i open the terminal : so how to do this ?

    Read the article

  • APress Deal of the Day 20/Dec/2010 - Beginning SQL Server Modeling: Model-Driven Application Development in SQL Server 2008

    - by TATWORTH
    Todays $10 bargain PDF from Apress is: Beginning SQL Server Modeling: Model-Driven Application Development in SQL Server 2008 Get ready for model-driven application development with SQL Server Modeling! This book covers Microsoft's SQL Server Modeling (formerly known under the code name "Oslo") in detail and contains the information you need to be successful with designing and implementing workflow modeling. $49.99 | Published Jul 2010 |

    Read the article

  • How can I make the camera return to the beginning of the terrain when it reaches the end?

    - by wbaccari
    How can I make the camera return to the beginning of the terrain when it reaches the end? I tried using the ICameraSceneNode*-setPosition(). if (camera->getPosition().X>1200.f) camera->setPosition(vector3df(1.f,1550.f,camera->getPosition().Z)); if (camera->getPosition().X<0.f) camera->setPosition(vector3df(1199.f,1550.f,camera->getPosition().Z)); if (camera->getPosition().Z>1200.f) camera->setPosition(vector3df(camera->getPosition().X,1550.f,1.f)); if (camera->getPosition().Z<0.f) camera->setPosition(vector3df(camera->getPosition().X,1550.f,1199.f)); It seems to work fine with a flat terrain (one shade of grey in heightmap) but it starts to produce a strange behavior as soon as i try to add some hills. Edit: The setPosition() call seems to perform a translation of the camera toward the new position, therefore the camera stops at the first obstacle it encounters on its way.

    Read the article

  • How can I match at the beginning of any line, including the first, with a Perl regex?

    - by JoelFan
    According the the Perl documentation on regexes: By default, the "^" character is guaranteed to match only the beginning of the string ... Embedded newlines will not be matched by "^" ... You may, however, wish to treat a string as a multi-line buffer, such that the "^" will match after any newline within the string ... you can do this by using the /m modifier on the pattern match operator. The "after any newline" part means that it will only match at the beginning of the 2nd and subsequent lines. What if I want to match at the beginning of any line (1st, 2nd, etc.)? EDIT: OK, it seems that the file has BOM information (3 chars) at the beginning and that's what's messing me up. Any way to get ^ to match anyway? EDIT: So in the end it works (as long as there's no BOM), but now it seems that the Perl documentation is wrong, since it says "after any newline"

    Read the article

  • Access VBA remove CR & LF only from the beginning of a text string by searching for them

    - by uZI
    Hi there I need to remove line breaks from the beginning of a memo type records. I dont want to use the replace function as it would remove all line breaks from the record which is not desired. Its only the line breaks at the beginning of the field that I am interested in removing. Furthermore, the my records do not always begin with a line break so I cant really use text positioning, the solution would be to look for line break at the beginning instead of always expecting it at the beginning. click here for a sample of what my data looks like any help will be greatly appreciated

    Read the article

  • What is the possible disadvantage of putting declarations in inner blocks, instead of at beginning of function?

    - by shan23
    At the place where I work, there are explicit guidelines for placement of declarations of variables. According to that, it is required to put them at the global level and / or at the beginning of functions, and not in inner blocks (such as a for loop). Since they've been specified by persons more experienced than I am, I'm sure that there must be a good reason for it, but I cannot figure out what that might be. It would be nice to know if there are any compile time / run time advantages at having them declared at a bigger scope.

    Read the article

  • I finished "Beginning Android Games", should I use its framework?

    - by orod
    I've worked through Mario Zechner's "Beginning Android Games" and have made my own pong and asteroids game using the framework used in the book. I have also downloaded the source code for Replica Island and am able to run that. I like Replica Island's framework over the one I made from reading the book. Some differences are that Replica Island uses different activities for each screen instead of Zechner's Screen class and that Replica Island can use a lot of textures and isn't limited to textures with dimensions of powers of 2. If I'm serious about writing games and apps for Android should I learn Replica Island's framework and use that instead of the one I made while reading Zechner's book?

    Read the article

  • What browser is sending user agent beginning mozilla/5.0+, tramslates & into &amp;

    - by Patrick
    We've got a website which has been running for a few years now. One of our customers has just started having an intermittent problem. Looking at our iis6.0 logs the service works correctly when they have a user agent beginning "mozilla/4.0+" but fails when the user agent begins "mozilla/5.0+". The particular customer only started having this problem on Wednesday. Does anyone know the browser/upgrade which changes the 4.0 to 5.0? The actual problem caused is that an "&" in a url parameter list is being encoded as "&amp;". Anyone seen anything similar? We have other users sending from browsers with the 5.0+ user agent without trouble. Sorry about the tags but don't have the rep to create new ones. Thanks in advance, Patrick Edit: hi Viper_sb, It is most probably a custom script (I'm primarily a c++ developer so don't really understand). Our site services requests from other customer developed sites, this one was done in Java script as far as I know. we're actually getting a variety of user agents (presumably depending on which of our customers customers is accessing the service), here's a few: Mozilla/5.0+(Windows;+U;+Windows+NT+6.1;+fr;+rv:1.9.1.11)+Gecko/20100701+Firefox/3.5.11 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US)+AppleWebKit/533.4+(KHTML,+like+Gecko)+Chrome/5.0.375.126+Safari/533.4 302 0 0 Mozilla/5.0+(Macintosh;+U;+PPC+Mac+OS+X;+fr)+AppleWebKit/523.12+(KHTML,+like+Gecko)+Version/3.0.4+Safari/523.12 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.9.2.8)+Gecko/20100722+Firefox/3.6.8 Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+fr;+rv:1.9.2.8)+Gecko/20100722+Firefox/3.6.8+(.NET+CLR+3.5.30729)

    Read the article

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