Search Results

Search found 288 results on 12 pages for 'jiwanje mp'.

Page 9/12 | < Previous Page | 5 6 7 8 9 10 11 12  | Next Page >

  • Force close when starting new activity

    - by Alex
    I'm trying to launch a new activity from my main activity, but I just get error codes all the time. Heres my main activity; public class gunstats extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button button4 = (Button)findViewById(R.id.button4); button4.setOnClickListener(new Button.OnClickListener() { public void onClick(View v) { Intent intent = new Intent(gunstats.this, more.class); startActivity(intent); } }); } } and the activity that is being called from my main class; public class more extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final MediaPlayer mp = MediaPlayer.create(this, R.raw.deagle); Button buttonm1 = (Button)this.findViewById(R.id.buttonm1); buttonm1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mp.start(); } }); } } And there's nothing wrong in the manifest Heres my logcat: 01-08 16:33:17.647: ERROR/AndroidRuntime(552): Uncaught handler: thread main exiting due to uncaught exception 01-08 16:33:17.676: ERROR/AndroidRuntime(552): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.gunstats/com.gunstats.more}; have you declared this activity in your AndroidManifest.xml? 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1480) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1454) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.app.Activity.startActivityForResult(Activity.java:2660) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.app.Activity.startActivity(Activity.java:2704) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at com.gunstats.gunstats$4.onClick(gunstats.java:64) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.view.View.performClick(View.java:2344) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.view.View.onTouchEvent(View.java:4133) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.widget.TextView.onTouchEvent(TextView.java:6504) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.view.View.dispatchTouchEvent(View.java:3672) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1712) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1202) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.app.Activity.dispatchTouchEvent(Activity.java:1987) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1696) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.view.ViewRoot.handleMessage(ViewRoot.java:1658) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.os.Handler.dispatchMessage(Handler.java:99) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.os.Looper.loop(Looper.java:123) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at android.app.ActivityThread.main(ActivityThread.java:4203) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at java.lang.reflect.Method.invokeNative(Native Method) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at java.lang.reflect.Method.invoke(Method.java:521) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 01-08 16:33:17.676: ERROR/AndroidRuntime(552): at dalvik.system.NativeStart.main(Native Method) What is causing this force close?

    Read the article

  • Why is there a Null Pointer Exception in this Java Code?

    - by algorithmicCoder
    This code takes in users and movies from two separate files and computes a user score for a movie. When i run the code I get the following error: Exception in thread "main" java.lang.NullPointerException at RecommenderSystem.makeRecommendation(RecommenderSystem.java:75) at RecommenderSystem.main(RecommenderSystem.java:24) I believe the null pointer exception is due to an error in this particular class but I can't spot it....any thoughts? import java.io.*; import java.lang.Math; public class RecommenderSystem { private Movie[] m_movies; private User[] m_users; /** Parse the movies and users files, and then run queries against them. */ public static void main(String[] argv) throws FileNotFoundException, ParseError, RecommendationError { FileReader movies_fr = new FileReader("C:\\workspace\\Recommender\\src\\IMDBTop10.txt"); FileReader users_fr = new FileReader("C:\\workspace\\Recommender\\src\\IMDBTop10-users.txt"); MovieParser mp = new MovieParser(movies_fr); UserParser up = new UserParser(users_fr); Movie[] movies = mp.getMovies(); User[] users = up.getUsers(); RecommenderSystem rs = new RecommenderSystem(movies, users); System.out.println("Alice would rate \"The Shawshank Redemption\" with at least a " + rs.makeRecommendation("The Shawshank Redemption", "asmith")); System.out.println("Carol would rate \"The Dark Knight\" with at least a " + rs.makeRecommendation("The Dark Knight", "cd0")); } /** Instantiate a recommender system. * * @param movies An array of Movie that will be copied into m_movies. * @param users An array of User that will be copied into m_users. */ public RecommenderSystem(Movie[] movies, User[] users) throws RecommendationError { m_movies = movies; m_users = users; } /** Suggest what the user with "username" would rate "movieTitle". * * @param movieTitle The movie for which a recommendation is made. * @param username The user for whom the recommendation is made. */ public double makeRecommendation(String movieTitle, String username) throws RecommendationError { int userNumber; int movieNumber; int j=0; double weightAvNum =0; double weightAvDen=0; for (userNumber = 0; userNumber < m_users.length; ++userNumber) { if (m_users[userNumber].getUsername().equals(username)) { break; } } for (movieNumber = 0; movieNumber < m_movies.length; ++movieNumber) { if (m_movies[movieNumber].getTitle().equals(movieTitle)) { break; } } // Use the weighted average algorithm here (don't forget to check for // errors). while(j<m_users.length){ if(j!=userNumber){ weightAvNum = weightAvNum + (m_users[j].getRating(movieNumber)- m_users[j].getAverageRating())*(m_users[userNumber].similarityTo(m_users[j])); weightAvDen = weightAvDen + (m_users[userNumber].similarityTo(m_users[j])); } j++; } return (m_users[userNumber].getAverageRating()+ (weightAvNum/weightAvDen)); } } class RecommendationError extends Exception { /** An error for when something goes wrong in the recommendation process. * * @param s A string describing the error. */ public RecommendationError(String s) { super(s); } }

    Read the article

  • ergonomics: what's better; trackball, ergonomic mouse or some other pointing device (a-la touchscree

    - by mauriciopastrana
    So I bit into the hype and recently purchased an apple wireless keyboard and that evil bar-of-soap thing apple makes for a mouse. Couple of hundred dollars later and this is where I begin to worry about RSI. Go figure. Don't get me wrong, this apple mouse is genius and looks pretty as hell, but my right wrist feels tired after a full day's worth of work, so i'm thinking of switching. Anyone out there use a trackball? is this worse? should I get a super-ergonomic mouse instead? I've seen mouse-trackball combos but am not sold, they still elicit the same end-finger behaviour detrimental for RSI, right? I also have a wrist-rest mousepad, but couldn't find one suitable for my keyboard. I've even considered having a small touchscreen where the mousepad should go, no mouse (or alternatively, a usb trackpad). Just looking for ideas, is the trackball better than the mouse? /mp

    Read the article

  • SIMPLE Bug Tracking Suggestions?

    - by mauriciopastrana
    Any suggestions for good, solid, bug tracking solutions that let me (and company members) document bugs in 1-or-2-click steps? Basically I grew tired of all the overhead Mantis brings in... All I need is a list (do away with assign/status/priority/notes, phew! we're a small company!). I'm tempted to write it up in CakePHP, but before I do so, i'd love to know if there's something out there. Points if its free or web2-"ish". Cheers, Thx. /mp

    Read the article

  • How do you redirect https to http

    - by mauriciopastrana
    that is, the opposite of what (seemingly) everyone teaches. I have a server on https for which I paid an SSL cert for and a mirror for which I haven't and keep around for just for emergencies so it doesn't merit getting a cert for. On my client's desktops I have SOME shortcuts which point to http://production_server and https://productionserver (both work), however; I know that if my prod. server goes down, then DNS forwarding kicks in and those clients which have https on their shortcut will be staring at https://mirrorserver (Which doesnt work) and a big fat IE7 red screen of uneasyness for my company. Unfortunately, I can't just switch this around at the client level. These users are very computer illiterate: and are very likely to freak out from seeing https "insecurity" errors (specially the way FFX3 and IE7 handle it nowadays: FULL STOP, kinda thankfully, but not helping me here LOL). It's very easy to find apache solutions for http-https redirection, but for the life of me I can't do the opposite. Ideas? Cheers, /mp

    Read the article

  • How to make automake less ugly?

    - by Brendan Long
    I recently learned how to use automake, and I'm somewhat annoyed that my compile commands went from a bunch of: g++ -O2 -Wall -c fileName.cpp To a bunch of: depbase=`echo src/Unit.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ g++ -DHAVE_CONFIG_H -I. -I./src -g -O2 -MT src/Unit.o -MD -MP -MF $depbase.Tpo -c -o src/Unit.o src/Unit.cpp &&\ mv -f $depbase.Tpo $depbase.Po Is there any way to clean this up? I can usually easily pick out warning messages, but now the wall of text to read though is 3x bigger and much weirder. I know what my flags are, so making it just says "Compiling xxx.cpp" for each file would be perfect.

    Read the article

  • SQL Average Data Based on Distance

    - by jsmith
    I'm pretty new to SQL. I have a database with records based on road/milepoints. My goal is to get an average value every 52.8 ft along the road. My related table has data every 15 ft, this table of course has a foreign key relating it to the primary table. If I wanted to pull out the average value every 52.8 ft, along a given milepost, how would I go about this? Example Data: RecID Begin_MP End_MP 100 0 0.56 RecID MP Value1 Value2 100 0 159 127.7 100 0.003 95.3 115.3 100 0.006 82.3 107 100 0.009 56.5 74.5 100 0.011 58.1 89.1 100 0.014 95.2 78.8 100 0.017 108.9 242.5 100 0.02 71.8 73.3 100 0.023 84.1 80.2 100 0.026 65.5 66.1 100 0.028 122 135.8 100 0.031 99.9 230.7 100 0.034 95.7 111.5 100 0.037 127.3 74.3 100 0.04 140.7 543.1 The first Data is an example of a Road. The second subset of data are the values I need to query out every 52.8 ft. Thank you

    Read the article

  • Issue with python string join.

    - by Pradyot
    I have some code in which I apply a join to a list. The list before the join looks like this: ["'DealerwebAgcy_NYK_GW_UAT'", "'DealerwebAgcy'", "'UAT'", '@ECNPhysicalMarketCo nfigId', "'GATEWAY'", "'DEALERWEB_MD_AGCY'", "'NU1MKVETC'", "'mkvetcu'", "'C:\te mp'", '0', "'NYK'", '0', '1', "'isqlw.exe'", 'GetDate()', '12345', "'NYK'", '350 ', '7'] After the join this is the resulting string 'DealerwebAgcy_NYK_GW_UAT','DealerwebAgcy','UAT',@ECNPhysicalMarketConfigId,'GAT EWAY','DEALERWEB_MD_AGCY','NU1MKVETC','mkvetcu','C: emp',0,'NYK',0,1,'isqlw. exe',GetDate(),12345,'NYK',350,7 Note the element "'C:\temp'" which ends up as ,'C: emp', I tried something similar on the python command prompt , but I wasn't able to 2 repeat this. the relevant code responsible for this magic is as follows. values_dict["ECNMarketInstance"] = [strVal(self.EcnInstance_),strVal (self.DisplayName_) ,strVal(self.environment_), '@ECNPhysicalMarketConfigId', strVal(self.EcnGatewaTypeId_),strVal(self.ConnectionComponent_) ,strVal(self.UserName_),strVal(self.Password_),strVal(self.WorkingDir_),"0",strVal(self.region_),"0","1", strVal(self.LUVersion_), "GetDate()" , self.LUUserId_ ,strVal(self.LUOwningSite_),self.QuoteColumnId_ , self.Capabilities_] delim = "," joined = delim.join(values) print values print joined

    Read the article

  • Latex --- Is there a way to shift the equation numbering one tab space from the right margin (shift

    - by Murari
    I have been formatting my dissertation and one little problem is stucking me up. I used the following code to typeset an equation \begin{align} & R=\frac{P^2}{P+S'} \label{eqn:SCS}\\ &\mbox {where} \quad \mbox R = \mbox {Watershed Runoff} \notag\\ &\hspace{0.63in} \mbox P = \mbox{Rainfall} \notag\\ &\hspace{0.63in} \mbox S' = \mbox{Storage in the watershed $=\frac{1000}{CN}-10$ }\notag \end{align} My output requirement is such that: The equation should begin one tab space from the left margin The equation number should end at one tab space from the right margin With the above code, I have the equation begin at the right place but not the numbering. Any help will be extremely appreciated. Thanks MP

    Read the article

  • Android - Enter button with finger detection?

    - by Normano
    Hello, I'm working on a soundboard, however I've got a problem when it come to drag the finger over the screen to play the sounds for the buttons I drag the finger over. Button Button3 = (Button)findViewById(R.id.button03); Button3.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { if(event.getAction() == MotionEvent.ACTION_DOWN){ mp.playSound(3); } return false; } }); Do anyone know how I can detect when a finger enter a button and not click the button? THanks :)

    Read the article

  • what is equal to WebClient in javascript or jquery ?

    - by kamiar3001
    I am using WebClient. This won't work because WebClient runs server side and therefore uses different session from the users. What is the client version in java script and jquery ? Edit Section : I found a solution but it gives me error var html = $.ajax({ url: mp, //complete: hideBlocker, async: false }).responseText; $("#HomeView").hide(); $("#ContentView").html(html); //in this line it gives me script error $("#ContentView").show("fast"); the error says : SCRIPT5007: 'undefined' is null or not an object the stop line is : var count = theForm.elements.length; debugger is Microsoft internet explorer 9.0 beta

    Read the article

  • Play Shoutcast MP3 radio stream with Python?

    - by Zachary Brown
    I have managed to create an online radio station using Shoutcast and Sam Broadcaster. Now, I am wanting to build my own player for that radio station. I am not sure where to begin, I have googled, but no luck. I am using Python 2.6 on Microsoft Windows. I have managed to capture the stream and save it as an MP# on the hard disk, just not sure what to do with it next. I tried playback of the file, but it always pulls up errors. This is the code I have so far: import urllib target = open("broadcast.mp3") conn = urllib.urlopen("http://78.159.104.175:80") while True: target.write(con.read(5200)) Any help would be greatly appreciated!

    Read the article

  • Randomly generate sound from onClick and onShake events?

    - by Aaron
    I've literally looked everywhere on the net and found very little clarification on how to do this. Pretty much, I have 8 sound files laid out in an array.xml file and I need to play a randomly chosen file ONCE per or onClick or onShake. First off, what technique should I use to achieve this? ARRAY-RANDOM- STRING-PLAY? RANDOM INT-PLAY? RANDOM INT-STRING-PLAY? Any kind of direction will help greatly cause I'm almost 3 weeks worth of research into this. *NOTE: MediaPlayer mp = MediaPlayer.create(JelloMan.this, R.raw.sound) ...is what I'm stuck on being you can't replace the "R.raw" part with a string...

    Read the article

  • Compile error with initializer_list when trying to use it to initialize member value of class

    - by ilektron
    I am trying to make a class initializable from an initialization_list in a class constructor's constructor's initialization list. It works for a std::map, but not for my custom class. I don't see any difference other than templates are used in std::map. #include <iostream> #include <initializer_list> #include <string> #include <sstream> #include <map> using std::string; class text_thing { private: string m_text; public: text_thing() { } text_thing(text_thing& other); text_thing(std::initializer_list< std::pair<const string, const string> >& il); text_thing& operator=(std::initializer_list< std::pair<const string, const string> >& il); operator string() { return m_text; } }; class static_base { private: std::map<string, string> m_test_map; text_thing m_thing; static_base(); public: static static_base& getInstance() { static static_base instance; return instance; } string getText() { return (string)m_thing; } }; typedef std::pair<const string, const string> spair; text_thing::text_thing(text_thing& other) { m_text = other.m_text; } text_thing::text_thing(std::initializer_list< std::pair<const string, const string> >& il) { std::stringstream text_gen; for (auto& apair : il) { text_gen << "{" << apair.first << ", " << apair.second << "}" << std::endl; } } text_thing& text_thing::operator=(std::initializer_list< std::pair<const string, const string> >& il) { std::stringstream text_gen; for (auto& apair : il) { text_gen << "{" << apair.first << ", " << apair.second << "}" << std::endl; } return *this; } static_base::static_base() : m_test_map{{"test", "1"}, {"test2", "2"}}, // Compiler fine with this m_thing{{"test", "1"}, {"test2", "2"}} // Compiler doesn't like this { } int main() { std::cout << "Starting the program" << std::endl; std::cout << "The text thing: " << std::endl << static_base::getInstance().getText(); } I get this compiler output g++ -O0 -g3 -Wall -c -fmessage-length=0 -std=c++11 -MMD -MP -MF"static_base.d" -MT"static_base.d" -o "static_base.o" "../static_base.cpp" Finished building: ../static_base.cpp Building file: ../test.cpp Invoking: GCC C++ Compiler g++ -O0 -g3 -Wall -c -fmessage-length=0 -std=c++11 -MMD -MP -MF"test.d" -MT"test.d" -o "test.o" "../test.cpp" ../test.cpp: In constructor ‘static_base::static_base()’: ../test.cpp:94:40: error: no matching function for call to ‘text_thing::text_thing(<brace-enclosed initializer list>)’ m_thing{{"test", "1"}, {"test2", "2"}} ^ ../test.cpp:94:40: note: candidates are: ../test.cpp:72:1: note: text_thing::text_thing(std::initializer_list<std::pair<const std::basic_string<char>, const std::basic_string<char> > >&) text_thing::text_thing(std::initializer_list< std::pair<const string, const string> >& il) ^ ../test.cpp:72:1: note: candidate expects 1 argument, 2 provided ../test.cpp:67:1: note: text_thing::text_thing(text_thing&) text_thing::text_thing(text_thing& other) ^ ../test.cpp:67:1: note: candidate expects 1 argument, 2 provided ../test.cpp:23:2: note: text_thing::text_thing() text_thing() ^ ../test.cpp:23:2: note: candidate expects 0 arguments, 2 provided make: *** [test.o] Error 1 Output of gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.1-2ubuntu1~13.04' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.8.1 (Ubuntu 4.8.1-2ubuntu1~13.04) It compiles fine with the std::map constructed this way, and if I modify the static_base to return the strings from the maps, all is fine and dandy. Please help me understand what is going on here.

    Read the article

  • How do you use C++0x raw strings with GCC 4.5?

    - by Rob N
    This page says that GCC 4.5 has C++ raw string literals: http://gcc.gnu.org/projects/cxx0x.html But when I try to use the syntax from this page: http://www2.research.att.com/~bs/C++0xFAQ.html#raw-strings #include <iostream> #include <string> using namespace std; int main() { string s = R"[\w\\\w]"; } I get this error: /opt/local/bin/g++-mp-4.5 -std=gnu++0x -O3 rawstr.cc -o rawstr rawstr.cc:9:19: error: invalid character '\' in raw string delimiter rawstr.cc:9:5: error: stray 'R' in program What is the right syntax for raw strings?

    Read the article

  • Heavy use of templates for mobile platforms

    - by Chris P. Bacon
    I've been flicking through the book Modern C++ Design by Andrei Alexandrescu and it seems interesting stuff. However it makes very extensive use of templates and I would like to find out if this should be avoided if using C++ for mobile platform development (Brew MP, WebOS, iOS etc.) due to size considerations. In Symbian OS C++ the standard use of templates is discouraged, the Symbian OS itself uses them but using an idiom known as thin templates where the underlying implementation is done in a C style using void* pointers with a thin template layered on top of this to achieve type safety. The reason they use this idiom as opposed to regular use of templates is specifically to avoid code bloating. So what are opinions (or facts) on the use of templates when developing applications for mobile platforms.

    Read the article

  • Android: Playing sound when button clicked?

    - by gazeebo
    Hi all, I'm trying to play a sound file when a button is clicked but keeps getting an error. The error is "The method create(Context, int) in the type MediaPlayer is not applicable for the arguments (new View.OnClickListener(){}, int)" Here's my code: @Override public void onClick(View v) { // TODO Auto-generated method stub Button zero = (Button)this.findViewById(R.id.btnZero); zero.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub mp = MediaPlayer.create(this, R.raw.mamacita_zero); } }); } Any help or tips would be appreciated. Thnx!

    Read the article

  • How to Use PortT( ie GPIO) of MC9S12XDP512 microcontroller in MPC860 microprocesser code ?

    - by sagar
    Hi, Can u please guide me, how to access GPIO's of MC9S12XDP512 microcontroller in MPc860 microprocesser. In project MC9S12XDP512 microcontroller is connected with MPC860 mp through one connector, means we can have facility to access any registers from microntroller to microprocesser and vice versa by use of IMMR or CPM feathers. But i dont know how to use that to access resisters in MPC860. But i wish to use one gpio of MC9S12XDP512 microntroller in MPC860 code ( in C langanuge) to do some other operations. Please let me know if you have idea.

    Read the article

  • two HashMap iteration

    - by user431276
    I have two HashMaps and I can iterate both hashmaps with following code Iterator it = mp.entrySet().iterator(); while (it.hasNext()) { Map.Entry pairs = (Map.Entry)it.next(); String firstVal = pairs.getValue(); } Iterator it2 = mp2.entrySet().iterator(); while (it2.hasNext()) { Map.Entry pairs2 = (Map.Entry)it.next(); String SecondVal = pairs2.getValue(); } myFunction(firstVal, SecondVal) Is there anyway to iterate two hashmaps at the same time without using two loops? Currently, I have a method that accepts two parameters and each parameter value is stored in first and second hashmap. I have to iterate first hash then second to get values. I think there must be a good way to do it but I don't know :( P.S: there could be some errors in above code as this is just an example to explain my problem. Each iterator is a method in original program and accept one parameter. I couldn't copy past real time functions as they are HUGE !

    Read the article

  • Is there a way to shift the equation numbering one tab space from the right margin (shift towards le

    - by Murari
    I have been formatting my dissertation and one little problem is stucking me up. I used the following code to typeset an equation \begin{align} & R=\frac{P^2}{P+S'} \label{eqn:SCS}\\ &\mbox {where} \quad \mbox R = \mbox {Watershed Runoff} \notag\\ &\hspace{0.63in} \mbox P = \mbox{Rainfall} \notag\\ &\hspace{0.63in} \mbox S' = \mbox{Storage in the watershed $=\frac{1000}{CN}-10$ }\notag \end{align} My output requirement is such that: The equation should begin one tab space from the left margin The equation number should end at one tab space from the right margin With the above code, I have the equation begin at the right place but not the numbering. Any help will be extremely appreciated. Thanks MP

    Read the article

  • Vibration after regular intervals

    - by umar
    I have a beep system which gives you four beeps. One beep after a second for one second. However If its silent mode i want the vibrator to do the same, vibrate for 1 second 4 times after 1 second. This is the code I am using long[] pattern = new long[2]; pattern[0] = 10; pattern [1] = 30; switch (am.getRingerMode()) { case AudioManager.RINGER_MODE_VIBRATE: vibe.vibrate(pattern, 0); break; case AudioManager.RINGER_MODE_NORMAL: soundsOn(mp); break; Kindly how can i do what i want to do Best Regards

    Read the article

  • Getting unevaluated tcl arguments

    - by user1327792
    What I want to do is parse an argument to a tcl proc as a string without any evaluation. For example if I had a trivial proc that just prints out it's arguments: proc test { args } { puts "the args are $args" } What I'd like to do is call it with: test [list [expr 1+1] [expr 2+2]] And NOT have tcl evaluate the [list [expr 1+1] [expr 2+2]]. Or even if it evaluated it I'd still like to have the original command line. Thus with the trivial "test" proc above I'd like to be able to return: the args are [list [expr 1+1] [expr 2+2]] Is this possible in tcl 8.4 ? Thank you. -MP

    Read the article

  • VideoView Not Playing, Error(1,-1)

    - by Jesse J
    I originally thought that the video format was wrong, but after trying .mov, .3gp, and .mp4 with H.264, I'm wondering if something is wrong with my code? public class IntroActivity extends Activity { VideoView videoHolder; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override protected void onStart() { getWindow().setFormat(PixelFormat.TRANSLUCENT); videoHolder = new VideoView(this); //videoHolder = (VideoView)findViewById(R.id.myvideoview); Uri video = Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.menu); videoHolder.setVideoURI(video); videoHolder.start(); videoHolder.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { public void onCompletion(MediaPlayer mp) { videoHolder.start(); } }); setContentView(videoHolder); super.onStart(); }

    Read the article

  • HTC to launch Windows 7 phone in India

    - by samsudeen
    It is a good news for the Indian smart phone users as the wait is finally over for Windows 7 mobile.The Taiwanese  mobile giant HTC is all set to release its Windows 7 based Smartphone series in India from January. HTC HD7 & HTC Mozart , the two smart phones running on Windows 7 OS started appearing on the HTC Indian website (HTC India) from last week.Though Flip kart (Indian online e-commerce website)  has started getting pre -orders for HTC HD7 a month ago , the buzz has started from last week after the introduction of “HTC Mozart”. The complete feature comparison between both the smart phones is given below. Feature Comparison HTC Mozart HTC HD 7 Microsoft Windows 7 Microsoft Windows 7 Qualcomm Snapdragon Processor QSD 8250 1 GHz CPU Qualcomm Snapdragon Processor QSD 8250 1 GHz CPU 8MegaPixel camera with Xenon Flash 5 MP, 2592?1944 pixels, autofocus, dual-LED flash, 480 x 800 pixels, 3.7 inches 480 x 800 pixels, 4.3 inches 11.9mm thick and Weighs 130g 11.2 mm thick and Weighs 162 g Bluetooth 2.1 Bluetooth 2.1 8 GB of internal storage memory 8 GB of internal storage memory 512MB of ROM and 576 of RAM 512MB of ROM and 576 of RAM 3G HSDPA 7.2 Mbps and HSUPA 2 Mbps 3G HSDPA 7.2 Mbps; HSUPA 2 Mbps Wi-Fi 802.11 b/g/n Wi-Fi 802.11 b/g/n Micro-USB interconnector Micro-USB interconnector 3.5mm audio jack 3.5mm audio jack GPS antenna GPS antenna Standard battery Li-Po 1300 MA Standard battery, Li-Ion 1230 MA Standby 360 h (2G) up to 435 h (3G) Up to 310 h (2G) / Up to 320 h (3G) Talk time Up to 6 h 40 min (2G) and 5 h 30 min (3G) Up to 6 h 20 min (2G) / Up to 5 h 20 min (3G) Estimated Price “HTC HD 7″ is priced between  INR 27855 to 32000. though the price of “HDT Mozart” is officially not announced it is estimated to be around INR 30000. Where to Buy The Windows 7 phone is not yet available in stores directly, but most of the leading mobile stores are getting pre -orders. I have given some of the online store links below. Flip kart UniverCell This article titled,HTC to launch Windows 7 phone in India, was originally published at Tech Dreams. Grab our rss feed or fan us on Facebook to get updates from us.

    Read the article

  • ming 0.4.2 compilation errors on Ubuntu 12.04 when installing from source code

    - by gmuhammad
    I am trying to install ming 0.4.2 from source code and it was compilable before on Ubuntu 10.04, but now it' giving following compilation errors when I try to install using command sudo make install (libpng is already installed). /bin/bash ../libtool --tag=CC --mode=link gcc -g -O2 -Wall -DSWF_LITTLE_ENDIAN -o img2swf img2swf.o ../src/libming.la libtool: link: gcc -g -O2 -Wall -DSWF_LITTLE_ENDIAN -o .libs/img2swf img2swf.o ../src/.libs/libming.so gcc -DHAVE_CONFIG_H -I. -I../src -I../src -g -O2 -Wall -DSWF_LITTLE_ENDIAN -MT png2dbl.o -MD -MP -MF .deps/png2dbl.Tpo -c -o png2dbl.o png2dbl.c png2dbl.c: In function ‘readPNG’: png2dbl.c:64:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] mv -f .deps/png2dbl.Tpo .deps/png2dbl.Po /bin/bash ../libtool --tag=CC --mode=link gcc -g -O2 -Wall -DSWF_LITTLE_ENDIAN -o png2dbl png2dbl.o ../src/libming.la libtool: link: gcc -g -O2 -Wall -DSWF_LITTLE_ENDIAN -o .libs/png2dbl png2dbl.o ../src/.libs/libming.so png2dbl.o: In function `readPNG': /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:69: undefined reference to `png_create_read_struct' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:74: undefined reference to `png_create_info_struct' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:82: undefined reference to `png_create_info_struct' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:97: undefined reference to `png_init_io' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:98: undefined reference to `png_set_sig_bytes' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:99: undefined reference to `png_read_info' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:101: undefined reference to `png_get_IHDR' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:127: undefined reference to `png_get_valid' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:156: undefined reference to `png_read_update_info' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:158: undefined reference to `png_get_IHDR' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:162: undefined reference to `png_get_channels' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:187: undefined reference to `png_get_rowbytes' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:194: undefined reference to `png_read_image' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:128: undefined reference to `png_set_expand' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:135: undefined reference to `png_set_strip_16' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:143: undefined reference to `png_set_gray_to_rgb' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:151: undefined reference to `png_set_filler' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:125: undefined reference to `png_set_packing' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:107: undefined reference to `png_get_valid' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:117: undefined reference to `png_get_PLTE' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:78: undefined reference to `png_destroy_read_struct' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:92: undefined reference to `png_destroy_read_struct' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:86: undefined reference to `png_destroy_read_struct' png2dbl.o: In function `writeDBL': /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:278: undefined reference to `floor' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:280: undefined reference to `compress2' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:278: undefined reference to `floor' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:280: undefined reference to `compress2' collect2: ld returned 1 exit status make[1]: *** [png2dbl] Error 1 make[1]: Leaving directory `/home/gmuhammad/Downloads/ming-0.4.2/util' make: *** [install-recursive] Error 1

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12  | Next Page >