Search Results

Search found 6524 results on 261 pages for 'the ever kid'.

Page 169/261 | < Previous Page | 165 166 167 168 169 170 171 172 173 174 175 176  | Next Page >

  • C++ for small, individual projects (i.e. hobby programming)

    - by Ygam
    I recently started C++. I am using PHP right now and decided to take a look at C++. Web programming had me working with a couple of languages, with a couple of people. I wanted to do programming where I only had to bother with one language and create small utility apps (mostly not web-based). I wanted a compiled, strongly-type language without memorizing a tome of classes. Basically I wanted to learn C++ for the following: mobile programming (I don't ever want to go touching Java, and I don't have a Mac for Objective C or IPhone SDK) small desktop apps like DTRs, POSs creating small desktop-based games creating small Air-like applications that can access the web for additional content I heard that C++ is not beginner-friendly and is mostly used for huge projects with lots of calculations and fine details (like 3D games). Is it practical or even possible for me to use C++ for the above cases? (Sorry, I haven't delved on C++ that much yet, so aside from "huge, monolithic project", I don't know any other uses for it)

    Read the article

  • Having a problem with simple bool

    - by Code
    Hi guys, I've some really simple code that checks if my bool is == YES but it does not ever enter. NSLog(@"boool %d",self.arrayAlreadyPopulated ); if (self.arrayAlreadyPopulated == YES) { Match *aMatch = [appDelegate.matchScoresArray objectAtIndex:(numMatchCounter)]; aMatch.teamName1 = TeamNameHolder; } else { Match *aMatch = [[Match alloc] init]; aMatch.teamName1 = TeamNameHolder; [appDelegate.matchScoresArray addObject:aMatch]; [aMatch release]; } The debug at the top says that the value of self.arrayAlreadyPopulated is 1 on the 2nd pass as it should be. But it never enters the first first part but jumps down to the 'else' I cant see for the life of me what the problem is. -.- Anybody able to clue me in? Thanks -Code EDIT declaration code int theCounterCauseABoolWontWork; @property (nonatomic) int theCounterCauseABoolWontWork; @synthesize theCounterCauseABoolWontWork;

    Read the article

  • Java Int Array - Number being stored are different from ones specified

    - by Danadir
    Hey there, I have encountered the most weird problem ever in Java. When I am doing this: int []s = new int [5]; s[0] = 026; s[1] = 0011; s[2] = 1001; s[3] = 0026; s[4] = 1101; the numbers being stored in the array, seen from debug mode are different i.e. the numbers stored are 22,9,1001,22,1101. Can you give me some hints what might be wrong with this? Thanks in advance

    Read the article

  • Java spliting strings

    - by N0b
    Hi I've got a Java problem. I'm trying split a string when ever a " " occurs, for example the sentence test abc. Then move the first letter in each word from first to last. I got the moving the letter to work on the original string using String text = JOptionPane.showInputDialog(null,"Skriv in en normal text:"); char firstLetter = text.charAt(0); normal = text.substring(1,text.length()+0) + firstLetter; So my question is how would I split the string then start moving the letters around in each part of the cut string? Thanks in advance

    Read the article

  • Easiest way to keep SSRS child elements in the same relative position when the parent is re-positioned?

    - by Mac
    I am trying to revise the layout of an SSRS report where I have several textboxes that are child elements of a rectangle. When I reposition the parent rectangle down by x, all of the child textboxes maintain the same absolute position. Their "Location" (defined relative to the parent) decreases by x. I then need to reposition the child textboxes. Additionally, if any of these ever has a negative "Location" then the parent rectangle is then repositioned back up by x. What is the easiest way to move everything in unison? I can Control-click everything and then drag them or use the arrow keys, but I want to position everything with precision and the "Location" field in the Properties window disappears when selecting more than one item. Is there a way I can avoid individually computing and typing in every "Location" value every time I have a small layout change? I am using SSRS (11.0.3360.12) within the Visual Studio 2012 Shell. Thanks!

    Read the article

  • Problem in the Android documentation

    - by Nick
    Hi all, This is my first post ever -- I love the Android SDK (been at it for a week), but I did notice a small typo in the official documentation that needs correcting. Not sure if this is where I post it, but on this page: http://developer.android.com/reference/android/os/CountDownTimer.html within the example source code, the source says "CountdownTimer" on line one when it should say "CountDownTimer" (notice the capitalization of the letter "D"). An easy fix for one with programming experience, but the code as written will not compile, which could be confusing for someone using this code for the first time. Is this where documentation bugs are submitted, and if not, where should I go to request the fix? Thanks all!

    Read the article

  • What is the purpose of AnyVal?

    - by DaoWen
    I can't think of any situation where the type AnyVal would be useful, especially with the addition of the Numeric type for abstracting over Int, Long, etc. Are there any actual use cases for AnyVal, or is it just an artifact that makes the type hierarchy a bit prettier? Just to clarify, I know what AnyVal is, I just can't think of any time that I would actually need it in Scala. When would I ever need a type that encompassed Int, Character and Double? It seems like it's just there to make the type hierarchy prettier (i.e. it looks nicer to have AnyVal and AnyRef as siblings rather than having Int, Character, etc. inherit directly from Any).

    Read the article

  • PHP & MySQL Problem

    - by Fincha
    I Have a script, getting text from DB and post it on other DB. Problem is, if I have a Text lngen then 840 Words, I can't call this page. Get an error about "Not Found" or "Connection brocken" or what ever. In FF i get no error, only blank page. I found out the Problem is in lenght of the query i send... but how can i fix it??? My it be the Problem, if a query is longer then 6000 Characters?

    Read the article

  • Sync issue in collection fetch backbone

    - by Stefano Maglione
    i'm fetching a collection but i've problem because into the collection the function parse use an another ajax call.So if i try to console.log the response of fetch after the fetch linecode but it is ever undefined. Function call fetch: friends: function(){ var amici=new Amicizie(); var amicilist=amici.fetch(); console.log(amicilist);<---undefined,because executed before fetch collection called: var obj={}; var Amicizie = Backbone.Collection.extend({ url:'https://api.parse.com/1/classes/User/', parse: function(data) { var cur_user=Parse.User.current().id; $.ajax({ type: 'GET', headers: {'X-Parse-Application-Id':'qS0KL***EM1tyhM9EEPiTS3VMk','X-Parse-REST-API- Key':'nh3eoUo9G***JIfIt1Gm'}, url: "https://api.parse.com/1/classes/_User/?where=....", success: function(object) { console.log(object ); obj=object; console.log(obj ); }, error: function(data) { console.log("ko" ); } }); return obj.results; } }); return Amicizie; });

    Read the article

  • EXC_BAD_ACCESS iPhone Development

    - by gkres121
    Sorry, this could be a simple fix, as I am new to iPhone Development. In my Delegate, after pressing the create profile button, the create profile view is pushed: -(void) createProfile_clicked:(id)sender { AddNewProfile *create = [[AddNewProfile alloc] init]; [self.window addSubview:create.view]; [self invisibleCreateProfileBar]; AddNewProfile *controller = [[AddNewProfile alloc] initWithNibName:@"AddNewProfile" bundle:[NSBundle mainBundle]]; [ self.navigationController pushViewController:controller animated:YES ]; currentController=controller; } Then in the AddNewProfile.m: - (IBAction)backgroundTap:(id)sender { if([nameField isFirstResponder]){ [nameField resignFirstResponder]; } if([ageField isFirstResponder]){ [ageField resignFirstResponder]; } if([doctorNameField isFirstResponder]){ [doctorNameField isFirstResponder]; } if([doctorNumberField isFirstResponder]){ [doctorNumberField resignFirstResponder]; } } This leads to a exc_bad_access error every time the FirstResponder is ever messed with, with any of my controls. I can select a control(text box), but once I click out of one, it crashes. Any help would be greatly appreciated.

    Read the article

  • Python: Matching & Stripping port number from socket data

    - by tobywuk
    Hello, I have data coming in to a python server via a socket. Within this data is the string '<port>80</port>' or which ever port is being used. I wish to extract the port number into a variable. The data coming in is not XML, I just used the tag approach to identifying data for future XML use if needed. I do not wish to use an XML python library, but simply use something like regexp and strings. What would you recommend is the best way to match and strip this data? I am currently using this code with no luck: p = re.compile('<port>\w</port>') m = p.search(data) print m Thank you :)

    Read the article

  • How to set AssemblyInfo.cs based on the tfs project build number?

    - by Ahok Rudraraju
    The project is hosted on a tfs server and I need to access the build number which I assume is automatically generated when ever you build a project. I need to retrieve that build number and display it on the web pages so that QAs and testing people know exactly which build they are working on. I found how to create customize build numbers in the following link: http://msdn.microsoft.com/en-us/library/aa395241(v=vs.100).aspx but it dose not solve my problem as I do not have access to the build definition file. I am looking for some kind of post deployment task which can access the build number or may be generate one and probably write it down to a file, from where I can read it. I don't know if that makes any sense as this is my first time working on .Net

    Read the article

  • "Method name expected" error when trying add a handler method to a delegate - C#

    - by zakplayyy
    I keep getting the error "Method name expected" when trying add the a method to a delegate. I have a delegate which is invoked when ever my game ends. The function I'm trying to add to the delegate stops a countdown from flashing (the method is in a static class). I've searched about and I'm still unsure why its not working. Here is the line causing the error: LivesManager.gameEnded += new LivesManager.EndGame(CountdownManager.DisableFlashTimer(this)); The this passes the current form to the method so it can disable the timer flash on the form. I have added methods from static classes to the same delegate before and it works fine, the only difference is that I'm passing the form as a paramater and then it doesn't like it. Is there any way to pass the form to the method without the error? Thanks in advance :)

    Read the article

  • Why would you use a MyObject[] internally, but expose a List<MyObject>?

    - by timmyd
    I have come across a class that has an immutable property: MyObject[] allObjs The property is initialized like this: List<MyObject> objs = createAllMyObjects(); allObjs = objs.toArray(new MyObject[objs.size()]); When it is exposed through the accessor, it's done as a List: public List<MyObject> getAllMyObjects() { return Collections.unmodifiableList(Arrays.asList(allObjs)); } Why would a programmer do this? Is there a benefit that I don't know about? Performance is not a concern, as the array of objs will only ever number in a few dozen elements. It seems that we are going round and round in circles. The class is a sort of factory, so it's got a private constructor and exposes only static methods (not sure if this could be a reason for the madness).

    Read the article

  • can i use perl to download files in a php script?

    - by jision
    i have a file sharing website made in php which gives users to download files.But as i am using a hosted server there is limitation on time out and other factors that come to play while for a download script coded in php. This causes large files to get corrupted while downloading. i am looking for a solution for this i have tried using symbolic links but the force download factor is not taking place.... i am thinking of using perl to download files bt dont have any clue what so ever.... can any one help me outwith this problem???

    Read the article

  • Missing the Rails gem. Please `gem install -v=2.3.4 rails`

    - by Brian Roisentul
    I was trying to fix this error and I ended up with a new one. I have installed ruby 1.8.6, but using Built-in JRuby 1.4.0 for my app. Everything was working fine until I updated every gem(as specified by the answer I got from that link) and everything crashed: ever since I tried to start the app I received the following error message: Missing the Rails 2.3.4 gem. Please gem install -v=2.3.4 rails, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed. Then, I tried to uninstall the updates(to v2.3.8, most of them), so the last version is 2.3.4. In my config/environment.rb file I have this: RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION so I guess everything is as I left it before the update. The question is....why do I keep getting the error and I can't start the app?

    Read the article

  • Successive success checks

    - by Stockhausen
    Most of you have probably bumped into a situation, where multiple things must be in check and in certain order before the application can proceed, for example in a very simple case of creating a listening socket (socket, bind, listen, accept etc.). There are at least two obvious ways (don't take this 100% verbatim): if (1st_ok) { if (2nd_ok) { ... or if (!1st_ok) { return; } if (!2nd_ok) { return; } ... Have you ever though of anything smarter, do you prefer one over the other of the above, or do you (if the language provides for it) use exceptions?

    Read the article

  • mySQL .NET API - Delete all data from table

    - by keynesiancross
    Hi all, I'm trying to figure out if there is an easy way to delete all the data in a table using the mySQL .NET API. The only slightly more tricky part to this is that in the C# code, the business logic can be run in both cases where there is, or isn't, data in teh table. So in some regards I almost need an If statement... Currently I am using the following code, but it doesn't seem to ever delete data... string deleteSQL = "DELETE FROM `data`.`currentData`"; MySqlCommand cmd2 = new MySqlCommand(deleteSQL, conn); Any thoughts would be much appreciated! Cheers

    Read the article

  • Using sed to delete string

    - by wired
    I was hacked and have hundreds of .js files with this line of code that I'm trying to get rid of: ;document.write('<iframe src="http://sitecorporatemanagement.ru/pretzellogmeins.cgi?8" scrolling="auto" frameborder="no" align="center" height="3" width="3"></iframe>'); It is the last line of the file, but I think the file contains windows line endings, because when ever I do this: sed -i '/sitecorporatemanagement.ru/d' * it deletes the full content of the file. Can you help me get this to work? I just need that full string deleted. Thank you for all the help you can give.

    Read the article

  • I need something to automate web browser tasks in its own virtual enviorment (Chrome)

    - by user1745926
    Ever since i started learning java i wanted to create a way to automate a few actions on a couple websites, For example, topline is a website that replaces all your ads with its own ads and pays you a bit of money for it, i want to emulate the act of just surfing the web, then start emulating specific tasks like clicking certain buttons or playing flash games (Actually playing the game by using image recognition) and this has to be written in java as i want to run this on a raspberry pi. any help is appreciated, is there a class that i can use? any help is appreciated!

    Read the article

  • Are there any simple ways to publish APKs on Google Play?

    - by StupidCodeGenerator
    I'm from China and we only publish APKs in Chinese market. This is my first time trying to put out game on Google Play. In China, publishing is pretty simple: They give us a jar file and we just import the file in our project and do something with a small document. But when I was reading the Google Play's document, I think it's too complicated. There're so many documents and what ever you read the document always tell you you need to read another document. Are there any simple ways to do this?

    Read the article

  • We have migrated VB6 code to C# in .net.

    - by VB
    The code was migrated using a third party tool. what ever the tool couldnt do, was done by the .net developers, so that all compile issues were fixed. My question is, for such migration activities, do we not bother running unit tests for the functions. Secondly, Could anyone suggest if we should use some tool in VSTS 10 to create a UML model of this code to minimize risks of issues that the client might find. How cumbersome is it. Are there any other suggestions for how quality migrated code can be delivered, in light of the fact that the functionality of the original VB6 application is unknown to us.

    Read the article

  • Delete data with foreign key in SQL Server table

    - by Andha
    I'm going to delete data in an SQL Server table (parent) which has a relationship with another table (child). I tried the basic Delete query. But it isn't working (and I know it won't). DELETE FROM table WHERE ... It returned following error The DELETE statement conflicted with the REFERENCE constraint ... I need to keep the table's schema. I know that I just need to add some words in the query, I've ever done this before, but I just couldn't recall it.

    Read the article

  • extract two parts of a string using regex in php

    - by Jubair
    Ok so I have this string: &lt;img src=images/imagename.gif alt='descriptive text here'&gt; and I am trying to split it up into the following two strings (array of two strings, what ever, just broken up). imagename.gif descriptive text here Note yes, its' actually the & lt; and not < same with the closing on the string. I know regex is the answer, but not the best at regext to know to pull it off in php.

    Read the article

  • C#: System.Collections.Concurrent.ConcurrentQueue vs. Queue

    - by James Michael Hare
    I love new toys, so of course when .NET 4.0 came out I felt like the proverbial kid in the candy store!  Now, some people get all excited about the IDE and it’s new features or about changes to WPF and Silver Light and yes, those are all very fine and grand.  But me, I get all excited about things that tend to affect my life on the backside of development.  That’s why when I heard there were going to be concurrent container implementations in the latest version of .NET I was salivating like Pavlov’s dog at the dinner bell. They seem so simple, really, that one could easily overlook them.  Essentially they are implementations of containers (many that mirror the generic collections, others are new) that have either been optimized with very efficient, limited, or no locking but are still completely thread safe -- and I just had to see what kind of an improvement that would translate into. Since part of my job as a solutions architect here where I work is to help design, develop, and maintain the systems that process tons of requests each second, the thought of extremely efficient thread-safe containers was extremely appealing.  Of course, they also rolled out a whole parallel development framework which I won’t get into in this post but will cover bits and pieces of as time goes by. This time, I was mainly curious as to how well these new concurrent containers would perform compared to areas in our code where we manually synchronize them using lock or some other mechanism.  So I set about to run a processing test with a series of producers and consumers that would be either processing a traditional System.Collections.Generic.Queue or a System.Collection.Concurrent.ConcurrentQueue. Now, I wanted to keep the code as common as possible to make sure that the only variance was the container, so I created a test Producer and a test Consumer.  The test Producer takes an Action<string> delegate which is responsible for taking a string and placing it on whichever queue we’re testing in a thread-safe manner: 1: internal class Producer 2: { 3: public int Iterations { get; set; } 4: public Action<string> ProduceDelegate { get; set; } 5: 6: public void Produce() 7: { 8: for (int i = 0; i < Iterations; i++) 9: { 10: ProduceDelegate(“Hello”); 11: } 12: } 13: } Then likewise, I created a consumer that took a Func<string> that would read from whichever queue we’re testing and return either the string if data exists or null if not.  Then, if the item doesn’t exist, it will do a 10 ms wait before testing again.  Once all the producers are done and join the main thread, a flag will be set in each of the consumers to tell them once the queue is empty they can shut down since no other data is coming: 1: internal class Consumer 2: { 3: public Func<string> ConsumeDelegate { get; set; } 4: public bool HaltWhenEmpty { get; set; } 5: 6: public void Consume() 7: { 8: bool processing = true; 9: 10: while (processing) 11: { 12: string result = ConsumeDelegate(); 13: 14: if(result == null) 15: { 16: if (HaltWhenEmpty) 17: { 18: processing = false; 19: } 20: else 21: { 22: Thread.Sleep(TimeSpan.FromMilliseconds(10)); 23: } 24: } 25: else 26: { 27: DoWork(); // do something non-trivial so consumers lag behind a bit 28: } 29: } 30: } 31: } Okay, now that we’ve done that, we can launch threads of varying numbers using lambdas for each different method of production/consumption.  First let's look at the lambdas for a typical System.Collections.Generics.Queue with locking: 1: // lambda for putting to typical Queue with locking... 2: var productionDelegate = s => 3: { 4: lock (_mutex) 5: { 6: _mutexQueue.Enqueue(s); 7: } 8: }; 9:  10: // and lambda for typical getting from Queue with locking... 11: var consumptionDelegate = () => 12: { 13: lock (_mutex) 14: { 15: if (_mutexQueue.Count > 0) 16: { 17: return _mutexQueue.Dequeue(); 18: } 19: } 20: return null; 21: }; Nothing new or interesting here.  Just typical locks on an internal object instance.  Now let's look at using a ConcurrentQueue from the System.Collections.Concurrent library: 1: // lambda for putting to a ConcurrentQueue, notice it needs no locking! 2: var productionDelegate = s => 3: { 4: _concurrentQueue.Enqueue(s); 5: }; 6:  7: // lambda for getting from a ConcurrentQueue, once again, no locking required. 8: var consumptionDelegate = () => 9: { 10: string s; 11: return _concurrentQueue.TryDequeue(out s) ? s : null; 12: }; So I pass each of these lambdas and the number of producer and consumers threads to launch and take a look at the timing results.  Basically I’m timing from the time all threads start and begin producing/consuming to the time that all threads rejoin.  I won't bore you with the test code, basically it just launches code that creates the producers and consumers and launches them in their own threads, then waits for them all to rejoin.  The following are the timings from the start of all threads to the Join() on all threads completing.  The producers create 10,000,000 items evenly between themselves and then when all producers are done they trigger the consumers to stop once the queue is empty. These are the results in milliseconds from the ordinary Queue with locking: 1: Consumers Producers 1 2 3 Time (ms) 2: ---------- ---------- ------ ------ ------ --------- 3: 1 1 4284 5153 4226 4554.33 4: 10 10 4044 3831 5010 4295.00 5: 100 100 5497 5378 5612 5495.67 6: 1000 1000 24234 25409 27160 25601.00 And the following are the results in milliseconds from the ConcurrentQueue with no locking necessary: 1: Consumers Producers 1 2 3 Time (ms) 2: ---------- ---------- ------ ------ ------ --------- 3: 1 1 3647 3643 3718 3669.33 4: 10 10 2311 2136 2142 2196.33 5: 100 100 2480 2416 2190 2362.00 6: 1000 1000 7289 6897 7061 7082.33 Note that even though obviously 2000 threads is quite extreme, the concurrent queue actually scales really well, whereas the traditional queue with simple locking scales much more poorly. I love the new concurrent collections, they look so much simpler without littering your code with the locking logic, and they perform much better.  All in all, a great new toy to add to your arsenal of multi-threaded processing!

    Read the article

< Previous Page | 165 166 167 168 169 170 171 172 173 174 175 176  | Next Page >