Search Results

Search found 1215 results on 49 pages for 'raphie palefsky smith'.

Page 29/49 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • Python-mode import problem

    - by smith
    I'm trying to use Emacs as a python editor and it works fine when I evaluate(C-c C-c) only single files but when I evaluate a file that imports another file in the same directory, I get an error saying that the file could not be imported. Does anyone know of a workaround? Thanks in advance

    Read the article

  • very strange thread error message

    - by John Smith
    I an trying to put a method in a separate thread in the background. It nearly works except that occasionally I get a lot of error messages with the message METHODCLOSURE: OH NO SEPERATE THREAD with the bad spelling and all. Does anyone know what this means?

    Read the article

  • Objective-C++ visibility question

    - by John Smith
    I have linked a library with my program. It works fine. The only problem is that there visibility errors/warnings (thousands of them). They are all of the form: newlib::method() has different visibility (default) in newlib.a and (hidden) in AppDelegate.o It is always with AppDelegate.o. I have tried to set the visibility for both the library and the main app in several ways: the visibility checkmark in XCode, and -fvisibility. Non seem to have worked. Is there somethin special about AppDelegate.mm?

    Read the article

  • AsyncTask, inner classes and Buttons states

    - by Intern John Smith
    For a musical application (a sequencer), I have a few buttons static ArrayList<Button> Buttonlist = new ArrayList<Button>(); Buttonlist.add(0,(Button) findViewById(R.id.case_kick1)); Buttonlist.add(1,(Button) findViewById(R.id.case_kick2)); Buttonlist.add(2,(Button) findViewById(R.id.case_kick3)); Buttonlist.add(3,(Button) findViewById(R.id.case_kick4)); Buttonlist.add(4,(Button) findViewById(R.id.case_kick5)); Buttonlist.add(5,(Button) findViewById(R.id.case_kick6)); Buttonlist.add(6,(Button) findViewById(R.id.case_kick7)); Buttonlist.add(7,(Button) findViewById(R.id.case_kick8)); that I activate through onClickListeners with for example Buttonlist.get(0).setActivated(true); I played the activated sound via a loop and ifs : if (Buttonlist.get(k).isActivated()) {mSoundManager.playSound(1); Thread.sleep(250);} The app played fine but I couldn't access the play/pause button when it was playing : I searched and found out about AsyncTasks. I have a nested class PlayPause : class PlayPause extends AsyncTask<ArrayList<Button>,Integer,Void> in which I have this : protected Void doInBackground(ArrayList<Button>... params) { for(int k=0;k<8;k++) { boolean isPlayed = false; if (Buttonlist.get(k).isActivated()) { mSoundManager.playSound(1); isPlayed = true; try {Thread.sleep(250); } catch (InterruptedException e) {e.printStackTrace();}} if(!isPlayed){ try {Thread.sleep(250);} catch (InterruptedException e) {e.printStackTrace();} } } return null; } I launch it via Play.setOnClickListener(new PlayClickListener()); with PlayClickListener : public class PlayClickListener implements OnClickListener { private Tutorial acti; public PlayClickListener(){ super(); } @SuppressWarnings("unchecked") public void onClick(View v) { if(Tutorial.play==0){ Tutorial.play=1; Tutorial.Play.setBackgroundResource(R.drawable.action_down); acti = new Tutorial(); Tutorial.PlayPause myPlayPause = acti.new PlayPause(); myLecture.execute(Tutorial.Buttonlist); } else { Tutorial.play=0; Tutorial.lecture.cancel(true); Tutorial.Play.setBackgroundResource(R.drawable.action); } } } But it doesn't work. when I click on buttons and I touch Play/Pause, I have this : 07-02 11:06:01.350: E/AndroidRuntime(7883): FATAL EXCEPTION: AsyncTask #1 07-02 11:06:01.350: E/AndroidRuntime(7883): Caused by: java.lang.NullPointerException 07-02 11:06:01.350: E/AndroidRuntime(7883): at com.Tutorial.Tutorial$PlayPause.doInBackground(Tutorial.java:603) 07-02 11:06:01.350: E/AndroidRuntime(7883): at com.Tutorial.Tutorial$PlayPause.doInBackground(Tutorial.java:1) And I don't know how to get rid of this error. Obviously, the Asynctask doesn't find the Buttonlist activated status, even if the list is static. I don't know how to access these buttons' states, isPressed doesn't work either. Thanks for reading and helping me !

    Read the article

  • Embedded Lua on iPhone. What's new and what does it mean?

    - by John Smith
    Apparently Apple has changed some term in the agreement again. From http://www.appleoutsider.com/2010/06/10/hello-lua/ section 3.3.2 is now Unless otherwise approved by Apple in writing, no interpreted code may be downloaded or used in an Application except for code that is interpreted and run by Apple’s Documented APIs and built-in interpreter(s). Notwithstanding the foregoing, with Apple’s prior written consent, an Application may use embedded interpreted code in a limited way if such use is solely for providing minor features or functionality that are consistent with the intended and advertised purpose of the Application. instead of the original No interpreted code may be downloaded or used in an Application except for code that is interpreted and run by Apple’s Documented APIs and built-in interpreter(s). I am more interested in embedding Lua, but other people have other embeddings they want to make. I am wondering how you ask for permission, and what they mean by the terms "minor features" and "consistent" and how will Apple interpret this section? It seems to have enough loopholes to drive a real firetruck through.

    Read the article

  • java decmail string to AS 3.0 conversion procedure

    - by Jack Smith
    Hello, I have a problem with conversion java code to action script 3. Anyone can help with code translation? Thanks. public static short[] decmail_str_to_binary_data(String s) { short[] data = new short[s.length()/2]; for (int i = 0; i < s.length(); i += 2) { char c1 = s.charAt(i); char c2 = s.charAt(i + 1); int comb = Character.digit(c1, 16) & 0xff; comb <<= 4; comb += Character.digit(c2, 16) & 0xff; data[i/2] = (short)comb; } return data; }

    Read the article

  • Checking Android version

    - by John Smith
    I need if the phone running the app api level is 14 which is android 4.0 or more ( example api levcel 15 ) then startActivity ... else if the api level is lower than 14 ( example 13 ), then startActivity ... String AndroidVersion = android.os.Build.VERSION.RELEASE; if ( AndroidVersion == 4.0 ) { Intent start = new Intent(S.this, Menu.class); startActivity(start); } else { Intent startt = new Intent(S.this, Menu2.class); startActivity(startt); } whats the wrong ?

    Read the article

  • Is there anything inherently wrong with long variable/method names in Java?

    - by Doug Smith
    I know this is probably is a question of personal opinion, but I want to know what's standard practice and what would be frowned upon. One of my profs in university always seems to make his variable and method names as short as possible (getAmt() instead of getAmount) for instance. I have no objection to this, but personally, I prefer to have mine a little longer if it adds descriptiveness so the person reading it won't have to check or refer to documentation. For instance, we made a method that given a list of players, returns the player who scored the most goals. I made the method getPlayerWithMostGoals(), is this wrong? I toiled over choosing a way to make it shorter for awhile, but then I thought "why?". It gets the point across clearly and Eclipse makes it easy to autocomplete it when I type. I'm just wondering if the short variable names are a piece of the past due to needing everything to be as small as possible to be efficient. Is this still a requirement?

    Read the article

  • SQL Server float datatype

    - by Martin Smith
    The documentation for SQL Server Float says Approximate-number data types for use with floating point numeric data. Floating point data is approximate; therefore, not all values in the data type range can be represented exactly. Which is what I expected it to say. If that is the case though why does the following return 'Yes' in SQL Server DECLARE @D float DECLARE @E float set @D = 0.1 set @E = 0.5 IF ((@D + @D + @D + @D +@D) = @E) BEGIN PRINT 'YES' END ELSE BEGIN PRINT 'NO' END but the equivalent C++ program returns "No"? #include <iostream> using namespace std; int main() { float d = 0.1F; float e = 0.5F; if((d+d+d+d+d) == e) { cout << "Yes"; } else { cout << "No"; } }

    Read the article

  • Creating a floating button

    - by Robert Smith
    Hey all, I'm working on a Firefox extension and am out of ideas on how to implement a floating button. I need a button that is overlayed on my page that I can show/hide and dynamically position just about anywhere on my page. I thought I could do something like a fancy CSS tool-tip except replace it with button functionality, but that idea failed because I couldn't pull my example apart well enough to understand what all I need to include, need to change, etc. I've thought about using jQuery(though wouldn't mind avoiding, unless it makes this painfully easy) but will be looking more into that as a possibility now. If anyone can offer a tutorial link, ideas, sample code, anything to help get me moving in the right direction I will greatly appreciate it! Thanks! Edit: Clarification I'm not entirely sure how to actually create the overlayed button. I tried to create a a floating div with some text in it, and nothing showed up, but I got no errors, which means I'm doing something wrong, but I have no idea what that is. http://www.fijiwebdesign.com/blog/css-tooltips-floating-html-elements.html If you take a look at that webpage you see that there is that floating "feedback" button, I would like to create something similar, only it wouldn't be anchored to the sides, but I could position it over text, etc. #floatingBtn { position: absolute; z-index: 10000; top: 50%; left: 50%; } Thats the CSS I used to try and float my div. I don't know if I'm creating the div in the wrong place or... I thought if I could get a floating div with some text, I could turn that into my button.

    Read the article

  • packaging sequences of png files in iPhone APP for animations to reduce bundle size

    - by Brad Smith
    Basically, I have an application that uses a flip-book style animation technique. I am simply cycling through around 1000 320x480 pngs at 12fps, and everything works really well. Except for the fact that 1000 images takes up a ton of disk space. Ideally I'd like to be able to compress these images as a movie file and pull out each frame as I need them, or simply play back a movie with frame by frame precision. Ideas?

    Read the article

  • Website listing cms

    - by Smith
    i want to develop a property listing website just like https://www.websites4yourlistings.com/ Do you guys know of any free open source script i can use for the following tasks Gallarey script that has title and description, that can be uploaded by clients of deleted Pls suggest a method to create different template from the same layout by using different colours, css, back ground image Do you know any script that i can use to create a subdomain from my script? thanks for helping

    Read the article

  • Templating Word Documents in C#

    - by NullGeo
    I was wondering if there is a library out there such that it could give me the ability to fill in word templates with custom values. For example: Following could be the content of the Word Document {Address} {PhoneNumber} Hello {Name}, How are you doing? In C# I would like to do something like this to replace all the placeholders in the Word document: using(WordDocument doc = WordDocument.Load("Mail.docx")){ var person = new {Name = "John Smith", Address="42 Wallaby Way, Sydney", PhoneNumber="555-555-5555"}; doc.Template(person); doc.Print(); } The resulting document would look like this: 42 Wallaby Way, Sydney 555-555-5555 Hello John Smith, How are you doing? Any libraries out there (preferably free) that let's me do this? Edit: I am not asking you to find anything that let's me do this. If that was the case, I would do a Google search by myself. Honestly, all I am asking is "has anybody used a library in the past to do this exact thing."

    Read the article

  • IE7 and the CSS table-cell property

    - by Ryan Smith
    So I just love it when my application is working great in Firefox, but then I open it in IE and... Nope, please try again. The issue I'm having is that I'm setting a CSS display property to either "none" or "table-cell" with JavaScript. I was initially using "display: block;", but Firefox was rending it weird without the table-cell property. I would love to do this without adding an hack in the JavaScript to test for IE. Any suggestions? Thanks.

    Read the article

  • C++ arrays select square number and make new vector

    - by John Smith
    I have to see which of the following from a vector is a square number then make another vector with only the square numbers For example: (4,15,6,25,7,81) the second will be (4,25,81) 4,25,81 because 2x2=4 5x5=25 and 9x9=81 I started like this: { int A[100],n,r,i; cout<<"Number of elements="; cin>>n; for(i=1;i<=n;i++) { cout<<"A["<<i<<"]="; cin>>A[i]; } for(i=1;i<=n;i++) { r=sqrt(A[i]); if(r*r==A[i]) } return 0; } but I am not really sure how to continue

    Read the article

  • Lua-Objective-C bridge on the iphone

    - by John Smith
    I have partially ported the LuaObjCBridge to the iPhone. Most things work but there are still some issues I have to deal with. There are sections where #defines are defined with-respect-to intel or ppc. Is the ARM chip closer to intel or ppc? Here is the most relevant section where most of the defines are: #if defined(__ppc__)||defined(__PPC__)||defined(__powerpc__) #define LUA_OBJC_METHODCALL_INT_IS_SHORTEST_INTEGRAL_TYPE #define LUA_OBJC_METHODCALL_PASS_FLOATS_IN_MARG_HEADER #define LUA_OBJC_POWER_ALIGNMENT #elif defined(__i386__)||defined(__arm__) #warning LuaObjCBridge is not fully tested for use on Intel chips. #define LUA_OBJC_METHODCALL_RETURN_STRUCTS_DIRECTLY // Use this or the code was crashing for me for structs LUA_OBJC_METHODCALL_RETURN_STRUCTS_DIRECTLY_LIMIT #define LUA_OBJC_METHODCALL_USE_OBJC_MSGSENDV_FPRET #define LUA_OBJC_METHODCALL_RETURN_STRUCTS_DIRECTLY_LIMIT 8 #define LUA_OBJC_INTEL_ALIGNMENT #endif For now I added arm with i386, but I could be wrong

    Read the article

  • Released object crashes app

    - by John Smith
    I am using objective-C++ (+Boost) for iPhone development. I am in a rather tight loop and need to allocate and release a certain object. The code is something like this. for (int i=0;i<100;i++) { opt = [[FObj alloc] init]; //do stuff with opt [opt release]; } The FObj object is something like @interface FObj MyCPPObj * cppobj; @end In the implementation of FObj there is a dealloc method: -(void) dealloc { delete cppobj; //previously allocated with 'new' [super dealloc]; } I am afraid that if i don't release then the 'MyCPPObj's will just pile up. But releasing makes the app crash after the first loop. What am I doing wrong? Or perhaps should I make cppobj and boost::shared_ptr? (do boost shared pointers automatically release their objects when an objective-C++ object is deleted?)

    Read the article

  • c# warn if text box is empty or contains a non-whole number

    - by Jamaul Smith
    In my specific case, I need the value in propertyPriceTextBox to be numeric only, and a whole number. A value also has to be entered, and I can just Messagebox.Show() a warning and that's all I'd need to do. This is what I have so far. private void computeButton_Click(object sender, EventArgs e) { decimal propertyPrice; if ((decimal.TryParse(propertyPriceTextBox.Text, out propertyPrice))) decimal.Parse(propertyPriceTextBox.Text); { if (residentialRadioButton.Checked == true) commisionLabel.Text = (residentialCom * propertyPrice).ToString("c"); if (commercialRadioButton.Checked == true) commisionLabel.Text = (commercialCom * propertyPrice).ToString("c"); if (hillsRadioButton.Checked == true) countySalesTaxTextBox.Text = ( hilssTax * propertyPrice).ToString("c"); if (pascoRadioButton.Checked == true) countySalesTaxTextBox.Text = (pascoTax * propertyPrice).ToString("c"); if (polkRadioButton.Checked == true) countySalesTaxTextBox.Text = (polkTax * propertyPrice).ToString("c"); decimal result; result = (countySalesTaxTextBox.Text + stateSalesTaxTextBox.Text + propertyPriceTextBox.Text + comissionTextBox.Text).ToString("c"); } else (.) MessageBox.Show("Property Price must be a whole number."); }

    Read the article

  • Rotating blocks in JavaScript.

    - by Alvin SMith
    I'd like to create a JavaScript web app that makes blocks appear on the page that can be dragged around by the user. If I used DIVs with background colors, it would be easy to rotate them by 90 degrees at a time. However, if I wanted to rotate them arbitrarily, how could I accomplish this? I'd rather not have to resort to Flash, images, or HTML5.

    Read the article

  • How to show useful error messages from a database error callback in Phonegap?

    - by Magnus Smith
    Using Phonegap you can set a function to be called back if the whole database transaction or the individual SQL statement errors. I'd like to know how to get more information about the error. I have one generic error-handling function, and lots of different SELECTs or INSERTs that may trigger it. How can I tell which one was at fault? It is not always obvious from the error message. My code so far is... function get_rows(tx) { tx.executeSql("SELECT * FROM Blah", [], lovely_success, statement_error); } function add_row(tx) { tx.executeSql("INSERT INTO Blah (1, 2, 3)", [], carry_on, statement_error); } function statement_error(tx, error) { alert(error.code + ' / ' + error.message); } From various examples I see the error callback will be passed a transaction object and an error object. I read that .code can have the following values: UNKNOWN_ERR = 0 DATABASE_ERR = 1 VERSION_ERR = 2 TOO_LARGE_ERR = 3 QUOTA_ERR = 4 SYNTAX_ERR = 5 CONSTRAINT_ERR = 6 TIMEOUT_ERR = 7 Are there any other properties/methods of the error object? What are the properties/methods of the transaction object at this point? I can't seem to find a good online reference for this. Certainly not on the Phonegap website!

    Read the article

  • Language restrictions on iPhone lifted?

    - by John Smith
    Apparently Apple has changed some term in the agreement again. From http://www.appleoutsider.com/2010/06/10/hello-lua/ section 3.3.2 is now Unless otherwise approved by Apple in writing, no interpreted code may be downloaded or used in an Application except for code that is interpreted and run by Apple’s Documented APIs and built-in interpreter(s). Notwithstanding the foregoing, with Apple’s prior written consent, an Application may use embedded interpreted code in a limited way if such use is solely for providing minor features or functionality that are consistent with the intended and advertised purpose of the Application. instead of the original No interpreted code may be downloaded or used in an Application except for code that is interpreted and run by Apple’s Documented APIs and built-in interpreter(s). I am more interested in embedding Lua, but other people have other embeddings they want to make. I am wondering how you ask for permission, and what they mean by the terms "minor features" and "consistent" and how will Apple interpret this section? It seems to have enough loopholes to drive a real firetruck through.

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >