Search Results

Search found 280 results on 12 pages for 'blow'.

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

  • Detect blow in Mic and do something {iPhone SDK}

    - by Momeks
    Hi , i found this tutorial , and it's good , but doesn't work for me ! here is the code : - (void)listenForBlow:(NSTimer *)timer { [recorder updateMeters]; const double ALPHA = 0.05; double peakPowerForChannel = pow(10, (0.05 * [recorder peakPowerForChannel:0])); lowPassResults = ALPHA * peakPowerForChannel + (1.0 - ALPHA) * lowPassResults; if (lowPassResults > 0.95) NSLog(@"Mic blow detected"); //change the background color e.g ! } in the console show me the nslog reseult like this (without any bowling !): 2010-04-11 23:32:27.935 MicBlow[2358:207] Mic blow detected 2010-04-11 23:32:27.965 MicBlow[2358:207] Mic blow detected 2010-04-11 23:32:27.995 MicBlow[2358:207] Mic blow detected 2010-04-11 23:32:28.026 MicBlow[2358:207] Mic blow detected 2010-04-11 23:32:28.055 MicBlow[2358:207] Mic blow detected 2010-04-11 23:32:28.086 MicBlow[2358:207] Mic blow detected 2010-04-11 23:32:28.115 MicBlow[2358:207] Mic blow detected 2010-04-11 23:32:28.145 MicBlow[2358:207] Mic blow detected 2010-04-11 23:32:28.175 MicBlow[2358:207] Mic blow detected 2010-04-11 23:32:28.205 MicBlow[2358:207] Mic blow detected 2010-04-11 23:32:28.236 MicBlow[2358:207] Mic blow detected i change this value : if (lowPassResults < 0.95) to if (lowPassResults > 0.95) so it seems work ! but doesn't chage anything , again if i put the background changing code the , my code change background but without any bowling !! what's the problem ?

    Read the article

  • GNU info pages BLOW

    - by mbac32768
    How many times have you looked up a man page only to discover that it's useless and you're told to view the info page instead? Well, info is an abortion and I refuse to use it. How do you cope? Lets the healing begin. Curious if anyone has a nifty 'man' wrapper that auto-magically probes for an info document and converts that into a man page on-the-fly.

    Read the article

  • Qt, MSVC, and /Zc:wchar_t- == I want to blow up the world

    - by Noah Roberts
    So Qt is compiled with /Zc:wchar_t- on windows. What this means is that instead of wchar_t being a typedef for some internal type (__wchar_t I think) it becomes a typedef for unsigned short. The really cool thing about this is that the default for MSVC is the opposite, which of course means that the libraries you're using are likely compiled with wchar_t being a different type than Qt's wchar_t. This doesn't become an issue of course until you try to use something like std::wstring in your code; especially when one or more libraries have functions that accept it as parameters. What effectively happens is that your code happily compiles but then fails to link because it's looking for definitions using std::wstring<unsigned short...> but they only contain definitions expecting std::wstring<__wchar_t...> (or whatever). So I did some web searching and ran into this link: http://bugreports.qt.nokia.com/browse/QTBUG-6345 Based on the statement by Thiago Macieira, "Sorry, we will not support building Qt like this," I've been worried that fixing Qt to work like everything else might cause some problem and have been trying to avoid it. We recompiled all of our support libraries with the /Zc:wchar_t- flag and have been fairly content with that until a couple days ago when we started trying to port over (we're in the process of switching from Wx to Qt) some serialization code. Because of how win32 works, and because Wx just wraps win32, we've been using std::wstring to represent string data with the intent of making our product as i18n ready as possible. We did some testing and Wx did not work with multibyte characters when trying to print special stuff (even not so special stuff like the degree symbol was an issue). I'm not so sure that Qt has this problem since QString isn't just a wrapper to the underlying _TCHAR type but is a Unicode monster of some sort. At any rate, the serialization library in boost has compiled parts. We've attempted to recompile boost with /Zc:wchar_t- but so far our attempts to tell bjam to do this have gone unheeded. We're at an impasse. From where I'm sitting I have three options: Recompile Qt and hope it works with /Zc:wchar_t. There's some evidence around the web that others have done this but I have no way of predicting what will happen. All attempts to ask Qt people on forums and such have gone unanswered. Hell, even in that very bug report someone asks why and it just sat there for a year. Keep fighting with bjam until it listens. Right now I've got someone under me doing that and I have more experience fighting with things to get what I want but I do have to admit to getting rather tired of it. I'm also concerned that I'll KEEP running into this issue just because Qt wants to be a c**t. Stop using wchar_t for anything. Unfortunately my i18n experience is pretty much 0 but it seems to me that I just need to find the right to/from function in QString (it has a BUNCH) to encode the Unicode into 8-bytes and visa-versa. UTF8 functions look promising but I really want to be sure that no data will be lost if someone from Zimbabfuckegypt starts writing in their own language and the documentation in QString frightens me a little into thinking that could happen. Of course, I could always run into some library that insists I use wchar_t and then I'm back to 1 or 2 but I rather doubt that would happen. So, what's my question... Which of these options is my best bet? Is Qt going to eventually cause me to gouge out my own eyes because I decided to compile it with /Zc:wchar_t anyway? What's the magic incantation to get boost to build with /Zc:wchar_t- and will THAT cause permanent mental damage? Can I get away with just using the standard 8-bit (well, 'common' anyway) character classes and be i18n compliant/ready? How do other Qt developers deal with this mess?

    Read the article

  • Adobe Flash or After Effects: How to make a piece of virtual paper blow away?

    - by Allen G
    About a month ago I saw a portfolio website in Flash that featured a stack of cards, and each time you clicked on it, they sort of blew all over the place, thus exposing the backs as videos and pictures. Although I could easily take a bunch of 3D planes and tween them to turn and flip, these cards actually seemed to 'bend'. How is this effect achieved? Sorry I don't have the link to the example. Thanks!

    Read the article

  • SSMS Tools Pack 2.0 is out! With huge productivity booster features that will blow your mind and ease your job even more.

    - by Mladen Prajdic
    What better way to end the summer and start those productive autumn days ahead than with a fresh new version of the SSMS Tools Pack. This is a big release with two new features that are huge productivity boosters. First new feature are Tab Sessions. Every SQL tab you open is saved every N (default 2) minutes and is stored in a session. This works similar to internet browser sessions. Once you reopen SSMS you can restores your last session with a click of a button. You even get every window connected to the server it was previously connected to. The Tab History Window looks like this:   The second feature is Execution Plan Analyzer. It is designed to quickly help you find costliest operators by a number of properties. If that's not enough you can easily search through the whole execution plan for whatever you like. And to top it off you can auto analyze the execution plan. The analysis reports various problems the execution plan has and suggests a most common solution. The ultimate purpose of the Execution Plan Analyzer is to make your troubleshooting quicker and easier. It uses a simple user interface that is easy to navigate and is built directly into the execution plan itself. The execution plan analyzer looks like this:   Smaller fixes include a completely redesigned SQL History Search window and various other bug fixes. You can download the new version 2.0 at the Download page. For more detailed feature descriptions go to the main Features Page. Enjoy it!

    Read the article

  • Can a grails controller extend from a base class? How to make it so grails doesn't blow up?

    - by egervari
    I wrote a base class to help build my controllers more quickly and to remove duplication. It provides some helper methods, default actions and some meta programming to make these things easier to build. One of those methods in the base class is like this: def dynamicList(Class clazz) { def model = new LinkedHashMap() model[getMapString(clazz) + "s"] = list(clazz) model[getMapString(clazz) + "sTotal"] = count(clazz) model } The action that calls it, also in the base class, is this: def list = { dynamicList(clazz) } Unfortunately, when I go to list action in the controller subclass that inherits the base class when my application is deployed, I get this exception: groovy.lang.MissingMethodException: No signature of method: groovy.lang.MissingMethodException.dynamicList() is applicable for argument types: (java.lang.Class) values: [class project .user.User] at project.user.UserController$_closure1.doCall(UserController.groovy:18) at project.user.UserController$_closure1.doCall(UserController.groovy) at java.lang.Thread.run(Thread.java:619) How can I hit grails over the head and just tell it do what I want it to do? My controller unit tests run just fine, so grails' run-time is totally at fault :/ Ken

    Read the article

  • jet fighter games

    - by j-t-s
    does anyone know of any good fighter jet combat pc games where you can blow up ANYTHING e.g. planes, jets, buildings, etc? I've noticed that alot of games now don't allow you to blow up buildings and i have my own conclusions about that, but it IS just a game, and i miss the good old days where there were no boundaries in games any help is appreciated thank you :)

    Read the article

  • Ubuntu 12.10 Help! Everything is incredibly slow

    - by Keith
    I installed 12.10 from usb onto this machine. Intel celeron 2.00 GHz 496MB RAM I had to modify GNU-Grub to read "nomodeset" or i could not see the GUI. I have an Nvidia graphics card. Takes about 2 minutes to boot. The icons on the left of desktop take about 1 min to slowly open their menu. Have a network connection but mozilla is 404 and i cannot update. Where can i find a blow by blow explanation for troubleshooting and repairing this problem?

    Read the article

  • [hibernate - jpa ] good practices and bad practices

    - by blow
    Hi all, i have some questions about interaction with hibernate. openSession or getCurrentSession (without jta, thread insted)? How mix session operations with swing gui? Is good have something like this in a javabean class? public void actionPerformed(ActionEvent event) { // session code } Can i add methods to my entities that contains hql queries or is a bad practice? For example: // This method is in an entity MyOtherEntity.java class public int getDuration(){ Session session=HibernateUtil.getSessionFactory().getCurrentSession(); session.beginTransaction(); int sum=(Integer)session.createQuery("select sum(e.duration) as duration from MyEntity as e where e.myOtherEntity.id=:id group by e.name"). .setLong("id", getId()); .uniqueResult(); return sum; } In alternative how can i do this in a better and elegant way? Thanks.

    Read the article

  • The CHOICE : Firebird or H2

    - by blow
    Hi, i have to choice a database to use in server-mode for a java desktop application. I think both are great java database. In my opinion (im NOT well-informed): H2 PRO Is java based Develeopment say it is very very fast Easy to install, configure and use with java application H2 CONS Is a young project Reliability doubt for commercial porpouse FireBird PRO Rock solid project Well documented Should be fast and well optimized for large data Has a java driver... FireBird CONS It is not java based ... ? So, i can't choice between this great db, can i have a suggestion? Thank.

    Read the article

  • [java bean]hibernate Session breaks a java bean?

    - by blow
    Hi all, i have a simple JPanel bean in my projects, now i want to drag my panel bean class into my jframe. My panel bean class is like this: public class BeanPanel extends javax.swing.JPanel { /** Creates new form BeanPanel */ public BeanPanel () { initComponents(); Session session=HibernateUtil.getSessionFactory().openSession(); } This code seem to break the bean: Session session=HibernateUtil.getSessionFactory().openSession(); When i try to drag the class into my JFrame bean i had this error message: This component cannot be instantiated. Please make sure it is a JavaBeans Component If i comment it all works fine. What is the reason of this? Thanks.

    Read the article

  • [hibernate - jpa] @CollectionOfElements without create the apposite table

    - by blow
    Hi all. I have this: Municipality class @Entity public class Municipality implements Serializable { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Long id; private String country; private String province; private String name; @Column(name="cod_catasto") private String codCatastale; private String cap; @CollectionOfElements private List<Address> addressList; public Municipality() { } ... Address class @Embeddable public class Address implements Serializable { @ManyToOne(fetch=FetchType.LAZY) @Cascade(CascadeType.SAVE_UPDATE) private Municipality municipality; @Column(length=45) private String address; public Address() { } ... Address is embedded in another class Person. When i save an instance of Person, hibernate create 3 tables: PERSON, MUNICIPALITY and MUNICIPALITY_ADDRESSLIST. MUNICIPALITY_ADDRESSLIST contains 2 fields: MUNICIPALITY_ID (FK) and STREET. I don't want this table, i only want the ID of table MUNICIPALITY into table PERSON(that embeds Address), what should i do? I tried to add @JoinTable in Municipality entity like this: @CollectionOfElements @JoinTable(name="person") private List<Address> addressList; It partially worked, but i cant choose the column name of table PERSON that contains ID of the table MUNICIPALITY, it is, by hibernate choose, simply "MUNICIPALITY_ID"... Thbaks.

    Read the article

  • Java, dBase microsoft driver and deleted flag

    - by blow
    Hi, im connecting to dBase from java with this string: String url="jdbc:odbc:DRIVER={Microsoft dBase Driver (*.dbf)};DBQ="+databasePath+";DefaultDir="+databasePath+";DriverId=533;FIL=dBase IV;MaxBufferSize=2048;PageTimeout=5;"; Work fine, but with a SELECT statement i can retrieve only record that are not "deleted". In dBase database deletet record are only flagged deleted, so i want retrive deleted record too. Is this possibile? Thank.

    Read the article

  • PHP, create_function or evalute it at runtime?

    - by blow
    Hi all, i have a class with some method that depend by one parameter. What is the best way to write this method? Example: First way class Test{ var $code; function Test($type){ if($type=="A"){ $this->code=create_function(/*some args and some code*/); } else if($type=="B"){ $this->code=create_function(/*some args and some code*/); } } function use(/*some args*/){ return call_user_func($this->code,/*some args*/); } } Second way class Test{ var $type; function Test($type){ $this->type=$type; } function use(/*some args*/){ if($this->type=="A"){ //some code } else if($this->type=="B"){ //some code } } } $test=new Test("A"); $test->use(); Which way you would choose? Thanks.

    Read the article

  • What's the best NAME for "quick" Category you add to a file?

    - by Joe Blow
    So the other day I was sick of typing out repetetive addTarget:action:forControlEvents:s, and macros are only entertaining for so long, so I did this: @implementation UIControl (xx) -(void)addTarget:(id)target action:(SEL)action { [self addTarget:target action:action forControlEvents:UIControlEventTouchUpInside]; } @end *and simply added it at the top of the .m file in question. Works great of course, but notice the "xx".* What's the best thing to NAME a "quick" Category like this? Annoyingly, it appears you can not leave the xx blank - it would then become an "Extension" (which, incidentally, I don't understand at all). I was thinking maybe: a single underscore the name of the class again identically "quick" perhaps the name of the class in this file (as in "quick extra routines for UIControl in CherryBomb") - so it would be UIControl(CherryBomb), ie, remind you that these extra routines are handy for CherryBomb "x" your or your company's initials (use the same "quick" Category name everywhere) "ThisTextNeverUsedAnywhere" By the way, I've been assuming that Categories only happen in the files that see them (CherryBomb.m in the example) - they do not from then on apply app-wide. ie they only apply where you include the header file (UIControl+NattyStuff) or in the "quick" case only in the file to which one adds the text. (By the way ... it appears you do not actually need to include an interface for such a Category, i.e. you can omit... //you can actually get away without these lines... //#import <UIKit/UIControl.h> //@interface UIControl (x) //-(void)addTarget:(id)target action:(SEL)action; //@end ... that part and it works fine.) For people who love Categories, and who doesn't, what's the answer to this troubling question? What should you name a "quick" Category where the name is never going to be referenced again and is irrelevant? Is "_" a solution?

    Read the article

  • [hibernate - jpa] @OneToOne annotoation problem (i think...)

    - by blow
    Hi all, im new in hibernate and JPA and i have some problems with annotations. My target is to create this table in db (PERSON_TABLE with personal-details) ID ADDRESS NAME SURNAME MUNICIPALITY_ID First of all, i have a MUNICIPALITY table in db containing all municipality of my country. I mapped this table in this ENTITY: @Entity public class Municipality implements Serializable { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Long id; private String country; private String province; private String name; @Column(name="cod_catasto") private String codCatastale; private String cap; public Municipality() { } ... Then i make an EMBEDDABLE class Address containing fields that realize a simple address... @Embeddable public class Address implements Serializable { @OneToOne(cascade=CascadeType.ALL) @JoinColumn(name="id_municipality") private Municipality municipality; @Column(length=45) private String address; public Address() { } ... Finally i embedded this class into Person ENTITY @Entity public class Person implements Serializable { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Long id; private String name; private String surname; @Embedded private Address address; public Person() { } ... All works good when i have to save a new Person record, in fact hibernate creates a PERSON_TABLE as i want, but if i try to retrieve a Person record i have an exception. HQL is simply "from Person" The excpetion is (Entities is the package containing all classes above-mentioned): org.hibernate.AnnotationException: @OneToOne or @ManyToOne on Entities.Person.address.municipality references an unknown entity: Entities.Municipality Is the @OneToOne annotation the problem? Thanks.

    Read the article

  • netbeans + hibernate for java swing application

    - by blow
    Hi all, im developing a java swing app and i would use hibernate for persistance. Im totally new in jpa, hibernate and ORM in general. Im follow this tutorial, its easy but the problem is the java class that descrive a table in db are made from the table with reverse enginering. I want do the opposite process: i want make db table from the java class. The question is, how can i do this with netbeans? There are some tutorial?

    Read the article

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