I am in the process of building a mobile game with Corona SDK, which is based on Lua. Until now i didn't need any help but this time I can't seem to find the cause, and I've been searching for it for hours.
It's one of those timer problems, where, after leaving, removing, and revisiting the scene, items that are spawned within a loop just multiply themselves every relaunch. More specificly, everytime a "forbidden" collision happens, which leads to the relaunch, according to my onCollision function.
What I already corrected after hours of strenuous research :
--the code inside the onCollision function is now inside the "began" phase,
so that can't cause the multiplication
--the scene phases are also correctly used
--transitions and timers are all canceled right before the relaunch
Since the code would be too long for you to look through, I'd rather ask for some hints :
What do you have in mind can cause such problems, besides what I already mentioned.
I appreciate every answer! Thanks alot.
The above comments are valid, it is going to be hard to diagnose the problem without being able to look at the code.
In the past, I have found it very helpful to name all my objects when dealing with collisions, so when a collision happens I know what objects caused it and it is very helpful for debugging purposes.
It looks like you have an issue with how you are starting the scene and deallocating resources when the scene ends. You may want to start/stop physics when the scene leaves and comes back, but without code I can't give a concrete answer.
I'm brand new here, and also to Lua, so please bear with me...
I'm building an Airport in Minecraft, with my kids. I'm an overachiever and a dreamer, and at some point, my brain decided it would be a FANTASTIC idea to add in a cosmetic element that I have absolutely NO idea how to do. Smart, right?!
See, I got it in my head that I want to have display screens in our Airport that show the flight information of incoming/outgoing flights. Fast forward to my discovery of the Opencomputers mod for Minecraft, a few hours of watching tutorials on how to operate it, and thus began my search for knowledge of that which is the Lua language. Fortunately, I have a wee bit of coding experience (thanks to my college days) and I picked up the very basic of the basics. (It seems similar to C.) I've gleaned just enough to accomplish the bigger part of my goal: I've managed to write the bare bones of the program I dreamed up, and it works...for the most part. (I still need to figure out some redundancies and such...all in good time.)
But...it's so very plain, and not fancy at all. It doesn't look even remotely like what I was picturing in my head, and this simply will not do. So now I am on a quest to discover how to format the output of my program and make it look fantastic...or at least, as close as I can get it to what was in my head. I have managed to figure out how to change the gpu screen colors (foreground, background) so that is why it's blue/white. But it's not quite what I wanted, and it resets if the system is turned off. My goal is to change the format of the program output itself, not just the Opencomputers screen block. I've googled this until I'm blue in the face, and I have pored over forums and code tutorials and the like...only to fail at finding the information I need. It's possible that I've passed up the answer, simply because I'm still very new to the language, but that's another good reason for me to be here, right?
And so, I turn to you, O Great Dwellers of the Interwebs, the Keepers of Vast Programming Knowledge, for assistance. Please, pretty please, help me make my program look awesome. My kids just may think I'm the coolest Mom on the planet, and that would be more than fantastic...Not to mention we'd have one kickass airport to play around in. :)
Here's what you'll probably want to know:
First, This pic is what I want, (on the left) and what I have (on the right).
And here is the code for my program: http://pastebin.com/60nPfpB8
I apologize up front for all of the noob mistakes that my code is more than likely riddled with. I haven't figured out yet how to make the functions repeat themselves, or a good way to utilize a 24 hour clock for the "time" function. So any suggestions there would be welcome as well.
Thank you for taking the time to read, and I appreciate any help I can get with this. :)
I am working for a project at school regarding face detection, based on a technique described by Viola and Jones 2001/2004.
I've read that the OpenCV has an implementation of this algorithm, and it works very good.
I was wondering if you have any advices regarding what techniques (pre-processing) to apply to the images before testing the existence of a face (eg. histogram equalization) ?
I basically used the code from this sample program from the OpenCV page and it worked very well for my masters thesis project. If you get bad results or your lighting is strange you can try a histogram equalization.
with a friend I did something similar too for an university project, and especially on low resolution video sequences it really helped to upsample the frame, doubling its size. It was my friends' idea, who had previously taken an image processing class. Although equivalent, things like decreasing initial scan window size, horizontal and vertical steps didn't produce the same result. In other words it may be better to work on larger images with larger scan windows than on smaller with smaller scan windows. Don't know exactly why.
Bye ;-)
I know its too late. But do go through this site as well.
It speaks of the common pre-proccessing required for the images. Equalising the image, Editing irrelevant content etc
I'm running into a strange issue on Vista with the Performance monitoring API. I'm currently using code that worked fine on XP/2k, based around PdhGetFormattedCounterValue(). I start out using PdhExpandWildCardPath to expand the counters (I'm interested in overall network statistics), the counters I'm looking at are:
\\Network Interface(*)\\Bytes Received/sec
\\Network Interface(*)\\Bytes Sent/sec
\\Processor(_Total)\\% Processor Time
The problem is that on their first call they return PDH_INVALID_DATA, I don't think this is a problem, since if I query it again I will start getting data without the error. The problem is this - while the processor time is worked exactly as expected, neither of the network interface counters are returning anything - just 0 all the time. I verified using Perfmon that they are reporting data normally, so I'm at a loss as to what might be the issue. I caught this at MS:
http://support.microsoft.com/?scid=kb%3Ben-us%3B287159&x=11&y=9
But I'm not interested in multi-language for my task, so I don't think this is relevant. I will see if I can come up with some basic code showing exactly what I'm doing, but nothing is returning anything strange, and it worked on XP/2k, so I suspect something changed under the hood. Thanks!
It turns out the issue was that the network interfaces are both wildcards, whereas the Processor one is actually already rolled up by the performance monitoring. What I didn't realize was that it PdhExpandWildCardPath didn't return something directly usable by PdhAddCounter. By this I mean that if ExpandWildCard returns 3 expanded matches, they come back as a null separated strings - I understood this, but I had assumed that AddCounter would be effectively create a counter containing all three. Nope, reality is I needed to break up each path and request it individually from AddCounter, then roll up the results manually when I get them.
Hopefully this helps someone else to avoid the same mistake I made with less frustration. ;)
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I've typed around 75wpm for the last few years but I've always wondered how people type +100wpm.
I've searched but I primarily find typing tutors that teach you to type.. not teach you to type faster. So far the only tip I've come across is to learn dvorak.
Are there exercises or tips to help break through the 75wpm wall?
I'm assuming Steve Yegge's recent post prompted this? The comments contain a number of tools and games for measurement and improvement, both online and off. I'll list them here:
Gnu Typist
TyperA
TypeRacer (Several people named this site)
Typespeed
typeonline.co.uk
Update: I just tried GNU Typist as per Mark Biek's suggestion, and I have to say that it seems like the best of the lot mentioned so far. It looks like there is a Windows version available, although I'm sure there are prettier (and more expensive) apps out there.
Setting yourself up in an ergonomic typing position is a good start. Take a look at the diagram here - notice the arms in a straight line, feet on the floor, etc.
In my experience most people tend to slow down when they get to unusual keys - numbers, symbols, punctuation, etc, so maybe some focused practice on those key combinations? practice typing out long strings of numbers and symbols, maybe try to use some Perl code as your copy-page :)
One of the things that helped me was something I learned from pianist... when doing a touch typing program, deliberately slow down and speed up your rate of typing from disgustingly slow to really fast in slow waves. This helps train yourself to figure out how to get your fingers to work together faster and reinforces the key locations.
Another one is perhaps a speed reading course might help? Generally your fingers are the last line of slow down in typing.
If you want to practice while having a little fun check out http://typeracer.com
It let's you compete against other people and trust me, there's nothing better to get you typing faster than normal than a little healthy competition.
Practice!
GNU Typist is a great, free, multi-platform program for practicing. They have different sets of exercises for practicing touch-typing as well as general Speed Drills.
Like a previous poster said, practice, practice, practice. But, if you are a developer (since you are on this site I assume that you are), then writing code will probably not be the type of practice that you need to improve your typing skills past your current maximum. I would even argue that 75wpm is more than adequate for any code writing task. But if you really want to practice more then I would recommend picking up a copy of Typing of the Dead
Consider switching to a keyboard layout that's designed for quick typing instead of just being layed out as it is for historical reasons, e.g. Dvorak or Colemak.
For me, it also helped a lot to use the caps lock key as backspace, for example using SharpKeys on Windows.
If you are really hardcore, create your own keyboard layout. On Windows, you can do that with the Microsoft Keyboard Layout Creator.
Chat. A lot.
I never received any touch-typing training. Infact, when i first started, i had to search the keyboard for the key... Now after 7 years of IMing, its all muscle memory. I have never tried to speed my typing, but a lot of times it just flows without me even realizing that i am typing as i think. Also i have noticed i can type in my usernames and phrases i often use a LOT faster than the other things.
This may or may not have been a useful answer.
Be careful, increasing your typing speed can increase the risk of carpal tunnel syndrome:
"The typing speed may affect risk, in some cases, however. For example, the fingers of typists whose speed is 60 words per minute exert up to 25 tons of pressure each day." [source]
Consistency and practice. Four things that improved my typing dramatically:
Find a comfortable keyboard that
fits your hands very well. It's less
about ergonomics or split keyboards,
but more about finding one with perfect finger reach. And this means using the keyboard for a couple weeks to see if it fits. Once you pick a keyboard, use it 100% of time. Have the same keyboard at home and work.
Make sure your workstation is
properly fitted to you. Basically, follow any decent ergonomics guide (90 degrees everywhere is WRONG!!!).
All of this "ergonomics" stuff has the benefit of stress on the rest
of your body that can distract you or cause muscle fatigue (i.e. slower typing). Again, use the same workstation configuration everywhere--if that means getting the same expensive chair at home, do it.
When emailing, chatting, and posting, use complete words and sentences. Abbreviations, slang, and other "shortcuts" taught me a lot of bad typing habits and made me lazy. They also had a lot of awkward letter combinations that didn't show up in other places, including normal composition and coding.
Consistency. Use the same tools with
the same settings and shortcuts all
the time. The less time you spend
worrying about how the software
works and reaching for the mouse,
the faster your typing will be.
You need to pick yourself up a copy of Typing of the Dead and start killing zombies. You'll be honing your typing skills and preparing for the eminent zombie apocalypse at the same time! Grab the demo to check it out!
In all seriousness, I've had this game for years and it really has helped me improve my typing skills and it's way more fun than any other typing program out there.
Type to the beat of a song. Start with a slow beat and work your way up. Don't rush it. Typing in bursts is often counter productive. Rhythm causes accuracy. The keyboard is just like a musical instrument and that's how musicians gain accuracy. You also need to practice regularly, even if just for 5 mins each day, to train your muscles.
I forget the details, but I remember the following was asked of some famous violinist:
"How did you learn to play so fast?"
His reply: "Really, really slowly".
:)
Use both hands (and all ten fingers).
To maximize your typing speed, you need to use the opposite pinky to shift/ctrl etc. and you want to minimize the amount of time you have to "reacquire" the home position. My biggest increase in typing when coding was to really learn my IDE's keyboard shortcuts, since that eliminated the relatively slow process of using the mouse.
Disable your mouse. (This is more for overall computer productivity than WPM.)
And I know you can't do it on your own, so get someone to enforce it.
It'll force you to learn keyboard shortcuts and consider keyboard-friendly options.
A nice, tactile keyboard helps. Especially if it's blank. You'll be speeding along in no time.
http://store.daskeyboard.net/prdaskeulorb.html
If you are having a problem with a particular key combo or miss-typing a particular word, or even just want to practice something, put it into your password. That way you get it fixed in your muscle memory as you can't even see what you are typing.
Practice, Practice and Practice
Make it so that you cannot see the keyboard, this will force your mind to remember where the keys are. I used this when starting on the Colemak keyboard layout and it worked really well.
The biggest way I increased my speed was by never looking down at the keyboard. I also have a very ergonomic keyboard that splits the keyboard in half so I get use to the right hand using the right side and the left hand using the left side.
My hands aren't my bottleneck, so touchtyping doesn't make me any faster. I already don't get enough bitrate out of my head to max out my hunt and peck. some people (me) may never be able to TT effectively.
agreed on muscle memory though. common thngs like usr/pass always get boshed out quickly without thinking, but for code, my hands are not the bottleneck
Get a Kinesis Essential keyboard. Keys are laid out better for faster typing.
IRC-ing a lot helpen a great deal with me;
Especially playing those Trivia like games where the fastest one gets the points.
You can also try "typespeed" on Linux.
If you really need more speed and you think you've mastered the technique you can also consider using the Dvorak keyboard layout; It will help you type fast but you really need to adapt to it.
I switched to Dvorak and my typing speed has increased, and I also learned after 8 years, how to touch type.
I would double the suggestion(s) to switch to an ergonomic typing position. Also, I've noticed that I cannot type faster on my laptop. I have an external anti-RSI QWERTY keyboard (with the reverse-V style key layout), and I can type a lot faster with more accuracy on that that I can on my laptop.
If you use a contoured keyboard, like, for instance, the Kinesis Advantage keyboard, it is easier to type blind, since it is much easier to feel where your hands are on the keyboard if it isn't flat. After a couple of days I was typing considerably faster than on a normal keyboard. And there is also a version switchable to Dvorak layout, though I never bothered to try that.
About blind typing: in my experience, knowing where your hands are is the important and difficult thing in blind typing - and after years of keyboard use you know very well where the common keys are. So just concentrating every once in a while to have your hands in the proper position for blind typing, and to type the keys with the right finger will get you into blind typing in a couple of months without any additional exercise.
(source: kinesis-ergo.com)