Search Results

Search found 1471 results on 59 pages for 'nick lin'.

Page 15/59 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Google I/O 2011: Smart App Design

    Google I/O 2011: Smart App Design Travis Green, Max Lin, Robert Kaplow, Jóhannes Kristinsson, Ryan McGee Learn how to recommend the unexpected, automate the repetitive, and distill the essential using machine learning. This session will show you how you can easily add smarts to your apps with the Prediction API, and how to create apps that rapidly adapt to new data. From: GoogleDevelopers Views: 10078 47 ratings Time: 01:01:04 More in Science & Technology

    Read the article

  • Review the New Migration Guide to SQL Server 2012 Always On

    - by KKline
    I had the pleasure of meeting Mr. Cephas Lin, of Microsoft, last year at the SQL Saturday in Indianapolis and then later at the PASS Summit in the fall. Cephas has been writing content for SQL Server 2012 Always On. Cephas has recently published his first whitepaper, a migration guide to SQL Server AlwaysOn. Read it and then pass along any feedback: HERE Enjoy, -Kev - Follow me on Twitter !...(read more)

    Read the article

  • Review the New Migration Guide to SQL Server 2012 Always On

    - by KKline
    I had the pleasure of meeting Mr. Cephas Lin, of Microsoft, last year at the SQL Saturday in Indianapolis and then later at the PASS Summit in the fall. Cephas has been writing content for SQL Server 2012 Always On. Cephas has recently published his first whitepaper, a migration guide to SQL Server AlwaysOn. Read it and then pass along any feedback: HERE Enjoy, -Kev - Follow me on Twitter !...(read more)

    Read the article

  • C++ Linked List - Reading data from a file with a sentinel

    - by Nick
    So I've done quite a bit of research on this and can't get my output to work correctly. I need to read in data from a file and have it stored into a Linked List. The while loop used should stop once it hits the $$$$$ sentinel. Then I am to display the data (by searching by ID Number[user input]) I am not that far yet I just want to properly display the data and get it read in for right now. My problem is when it displays the data is isn't stopping at the $$$$$ (even if I do "inFile.peek() != EOF and omit the $$$$$) I am still getting an extra garbage record. I know it has something to do with my while loop and how I am creating a new Node but I can't get it to work any other way. Any help would be appreciated. students.txt Nick J Cooley 324123 60 70 80 90 Jay M Hill 412254 70 80 90 100 $$$$$ assign6.h file #pragma once #include <iostream> #include <string> using namespace std; class assign6 { public: assign6(); // constructor void displayStudents(); private: struct Node { string firstName; string midIni; string lastName; int idNum; int sco1; //Test score 1 int sco2; //Test score 2 int sco3; //Test score 3 int sco4; //Test score 4 Node *next; }; Node *head; Node *headPtr; }; assign6Imp.cpp // Implementation File #include "assign6.h" #include <fstream> #include <iostream> #include <string> using namespace std; assign6::assign6() //constructor { ifstream inFile; inFile.open("students.txt"); head = NULL; head = new Node; headPtr = head; while (inFile.peek() != EOF) //reading in from file and storing in linked list { inFile >> head->firstName >> head->midIni >> head->lastName; inFile >> head->idNum; inFile >> head->sco1; inFile >> head->sco2; inFile >> head->sco3; inFile >> head->sco4; if (inFile != "$$$$$") { head->next = NULL; head->next = new Node; head = head->next; } } head->next = NULL; inFile.close(); } void assign6::displayStudents() { int average = 0; for (Node *cur = headPtr; cur != NULL; cur = cur->next) { cout << cur->firstName << " " << cur->midIni << " " << cur->lastName << endl; cout << cur->idNum << endl; average = (cur->sco1 + cur->sco2 + cur->sco3 + cur->sco4)/4; cout << cur->sco1 << " " << cur->sco2 << " " << cur->sco3 << " " << cur->sco4 << " " << "average: " << average << endl; } }

    Read the article

  • GooglePlayServicesNotAvailable: GooglePlayServices not available due to error 1

    - by Mathias Lin
    I'm on Galaxy S III with Android 4.0.4, Google Play installed. In my app I try to get a token from the Google Play services, as described on https://developers.google.com/android/google-play-services/authentication. Since it's all quite new (the Google pages were last updated this week), there's not much documentation to be found, especially about each specific error code. final String token = GoogleAuthUtil.getToken(this, "[email protected]", "scope"); gives me an exception: 09-30 11:24:36.075: ERROR/GoogleAuthUtil(11984): GooglePlayServices not available due to error 1 09-30 11:24:36.105: ERROR/AuthTokenCheck_(11984): Error 1 com.google.android.gms.auth.GooglePlayServicesAvailabilityException: GooglePlayServicesNotAvailable at com.google.android.gms.auth.GoogleAuthUtil.f(Unknown Source) at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source) at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source) at mobi.app.activity.AuthTokenCheck.getAndUseAuthTokenBlocking(AuthTokenCheck.java:148) at mobi.app.activity.AuthTokenCheck$1.doInBackground(AuthTokenCheck.java:61) at android.os.AsyncTask$2.call(AsyncTask.java:264) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) at java.util.concurrent.FutureTask.run(FutureTask.java:137) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) at java.lang.Thread.run(Thread.java:856) https://developers.google.com/android/google-play-services/reference/com/google/android/gms/auth/package-summary tells me: GooglePlayServicesAvailabilityExceptions are special instances of UserRecoverableAuthExceptions which are thrown when the expected Google Play services app is not available for some reason. But what exactly does that mean? And how to resolve it? I've added the Google Play services extras in my SDK and the jar to my project, marked as 'exported'. I'm also wondering what the "Google Play services app" exactly is. Unfortunately it's all not very clearly described at https://developers.google.com/android/google-play-services/. The Google Play services component is delivered as an APK through the Google Play Store, so updates to Google Play services are not dependent on carrier or OEM system image updates. Newer devices will also have Google Play services as part of the device's system image, but updates are still pushed to these newer devices through the Google Play Store. Isn't "Google Play services" app the same as the "Google Play" app? Another question I have, due to lack of documentation: what is the scope parameter for? The documentation just says the following, but not defining what an 'authentication scope' exactly is: scope String representing the authentication scope.

    Read the article

  • facebook javascript sdk fb_xd_fragment??

    - by James Lin
    Hi guys, I am using the facebook javascript sdk to embed a like button in my page. What is fb_xd_fragment??? I see it appends to the end of my url like http://www.mysite.com/controller/?fb_xd_fragment, and this is causing some nasty recursive reload of the page. Cheers James

    Read the article

  • Android custom media controller using vidtry

    - by Mathias Lin
    I want to use a custom media controller in my Android app and therefore looking at the vidtry code (http://github.com/commonsguy/vidtry), especially Player.java: The sample works fine as it comes. But I want the sample to play the fixed video automatically on app startup (so I don't want to enter a URL). I added: @Override public void onStart() { super.onStart(); address.setText("/sdcard/mydata/category/1/video_agkkr6me.mp4"); go.setEnabled(true); onGo.onClick(go); } Strange thing here is that if I run the app, the audio of the video plays but the image doesn't show. Everything else works fine (progress bar, etc.). I can't figure out the difference between the manual click on the go-button and the programmatic one. I looked at the code and didn't see any difference that might occur between manual and programmatic click. I checked if any elements (esp. surface) might be hidden, but it's not. I even tried a surface.setVisibility(View.INVISIBLE); surface.setVisibility(View.VISIBLE); in case some issue with the redrawing, but no difference. The video image does show when I manually hit the go button, but just not on start up automatically.

    Read the article

  • ASP.NET HttpContext.GetLocalResourceObject() throws InvalidOperationException

    - by Dylan Lin
    Hi all, Let's say we have such site structure: App_LocalResources       |- A.aspx.resx       |- B.aspx.resx A.aspx B.aspx Now I use HttpContext.GetLocalResourceObject("~/A.aspx") in A.aspx.cs, and it works fine. But if I use HttpContext.GetLocalResourceObject("~/A.aspx") in B.aspx.cs, it throws an exception: The resource class for this page was not found. Please check if the resource file exists and try again. Exception Details: System.InvalidOperationException: The resource class for this page was not found. Please check if the resource file exists and try again. How can I resolve this problem? I want to read the local resources from an external page, and I don't want to read the .resx file myself. Thanks :-)

    Read the article

  • Which platform can we expect one's complement being used there?

    - by Jian Lin
    For some questions such as checking whether a number is odd or even, I noted the comment, a & 1 won't work when it is a one's complement machine or when the code is ported to a platform that uses one's complement. Since 30 years ago on the Superboard, TRS-80, Apple II, I haven't seen a system with one's complement. Are there popular systems that use one's complement still, or do we have some cell phone or mobile device that uses one's complement?

    Read the article

  • IEnumerable.GetEnumerator() and IEnumerable<T>.GetEnumerator()

    - by Dylan Lin
    Hi, In the .net framework, there's a generic IEnumerable<T> interface which inherits from the not-generic IEnumerable, and they both have a GetEnumerator() method. The only differents between these two GetEnumerator() is the return type. Now I have a similar design, but when I compile the code, the compiler said: MyInterface<T>.GetItem()' hides inherited member 'MyInterface.GetItem()'. Use the new keyword if hiding was intended. The MyInterface<T>.GetItem() returns a concrete type T, while MyInterface.GetItem() returns type System.Object. So I think if the BCL team guys compile the .net framework, they will get the same warning. I think having compiler warnings is not good, what do you think? And how can I solve this problem? I mean I want to get the concrete type T when calling the MyInterface<T>.GetItem() not just a instance of type System.Object. Thanks in advance! :-)

    Read the article

  • How to suppress a compiler warning in C# without using #pragma ?

    - by Dylan Lin
    Hi, I need to suppress a specfic compiler warning in C#. Now I can do it like this: #pragma warning disable 0649 private string _field; #pragma warning restore 0649 Is there a way to do it like the following? [SuppressCompilerWarning("0649")] private string _field; Because I only need to suppress warnings for this field, not a code block. Note: I want to suppress the compiler warning, not the Code-Analysis warning. Thanks!

    Read the article

  • In Mercurial, what is the exact step that Peter or me has to do so that he gets back the rolled back

    - by Jian Lin
    The short question is: if I hg rollback, how does Peter get my rolled back version if he cloned from me? What are the exact steps he or me has to do or type? This is related to http://stackoverflow.com/questions/3034793/in-mercurial-when-peter-hg-clone-me-and-i-commit-and-he-pull-and-update-he-g The details: After the following steps, Mary has 7 and Peter has 11. My repository is 7 What are the exact steps Peter or me has to do or type SO THAT PETER GETS 7 back? F:\>mkdir hgme F:\>cd hgme F:\hgme>hg init F:\hgme>echo the code is 7 > code.txt F:\hgme>hg add code.txt F:\hgme>hg commit -m "this is version 1" F:\hgme>cd .. F:\>hg clone hgme hgpeter updating to branch default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved F:\>cd hgpeter F:\hgpeter>type code.txt the code is 7 F:\hgpeter>cd .. F:\>cd hgme F:\hgme>notepad code.txt [now i change 7 to 11] F:\hgme>hg commit -m "this is version 2" F:\hgme>cd .. F:\>cd hgpeter F:\hgpeter>hg pull pulling from f:\hgme searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files (run 'hg update' to get a working copy) F:\hgpeter>hg update 1 files updated, 0 files merged, 0 files removed, 0 files unresolved F:\hgpeter>type code.txt the code is 11 F:\hgpeter>cd .. F:\>cd hgme F:\hgme>hg rollback rolling back last transaction F:\hgme>cd .. F:\>hg clone hgme hgmary updating to branch default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved F:\>cd hgmary F:\hgmary>type code.txt the code is 7 F:\hgmary>cd .. F:\>cd hgpeter F:\hgpeter>hg pull pulling from f:\hgme searching for changes no changes found F:\hgpeter>hg update 0 files updated, 0 files merged, 0 files removed, 0 files unresolved F:\hgpeter>type code.txt the code is 11 F:\hgpeter>

    Read the article

  • Ninject - initialise objects

    - by James Lin
    Hi guys, I am new to ninject, I am wondering how I can run custom initizlisation code when constructing the injected objects? ie. I have a Sword class which implements IWeapon, but I want to pass an hit point value to the Sword class constructor, how do I achieve that? Do I need to write my own provider? A minor question, IKernel kernel = new StandardKernel(new Module1(), new Module2(), ...); what is the actual use of having multiple modules in Kernel? I sorta understand it, but could someone give me a formal explaination and use case? Thanks a lot! James

    Read the article

  • In Mercurial, when Peter "hg clone" me, and I commit and he pull and update, he gets my version, but

    - by Jian Lin
    That is, in Mercurial, if Peter cloned from me by hg clone c:\mycode into his e:\code let's say there is a file code.txt and it contains the text the code is 7 Now, when I change it to the code is 11 and hg commit, then he can get my code using hg pull and hg update. Now his version says the code is 11 But if I decide the change was wrong and hg rollback, then my repository should have the 7 version, while the working directory should have the 11 version. So when Peter does an hg pull and hg update, he should be sync'ed up to my current repository, which is the 7, but I found that it is not the case -- he still gets the 11 version. Why is that? Can he get the rolled back code (the 7)? Does Git behave the same way too?

    Read the article

  • In Javascript event handling, why "return false" or "event.preventDefault()" and "stopping the event

    - by Jian Lin
    It is said that when we handle a "click event", returning false or calling event.preventDefault() makes a difference, in which the difference is that preventDefault will only prevent the default event action to occur, i.e. a page redirect on a link click, a form submission, etc. and return false will also stop the event flow. Does that mean, if the click event is registered several times for several actions, using $('#clickme').click(function() { … }) returning false will stop the other handlers from running? I am on a Mac now and so can only use Firefox and Chrome but not IE, which has a different event model, and tested it on FF and Chrome and all 3 handlers ran without any stopping…. so what is the real difference, or, is there a situation where "stopping the event flow" is not desirable? this is related to http://stackoverflow.com/questions/3042036/using-jquerys-animate-if-the-clicked-on-element-is-a-href-a and http://stackoverflow.com/questions/2017755/whats-the-difference-between-e-preventdefault-and-return-false

    Read the article

  • Problem with sizes of EditText and Button in Android

    - by DixieFlatline
    I want to make the edittext width the same size as button. My EditText is currently very small. I use relative layout. <TextView android:id="@+id/aha4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="17dip" android:text="Vzdevek:" android:layout_below="@id/aha3" /> <EditText android:id="@+id/nick" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_below="@id/nivo" android:layout_toRightOf="@id/aha4"/> <Button android:id="@+id/poslji" android:text="Pošlji" android:layout_height="wrap_content" android:layout_width="20dip" android:typeface="serif" android:textStyle="bold" android:layout_alignParentRight="true" android:layout_below="@id/nivo" android:layout_toRightOf="@id/nick"/> What i currently get is this: What is the appropriate layout_width for edittext and button?

    Read the article

  • How to convert TM-2 degree coordinate to lat lon on Android?

    - by Victor Lin
    I am writing a program that convert TM-2 degree to lat/lon on Android, but I can't find formula for that. I do find some example on internet, but most of them are convert with open source library, that I can't use on Android platform. I also find a java class that do convert from UTM to lat lon, but it seems no suitable for TM 2 degreen coordinate system. So my question is: how do I convert TM 2 degree coordinate to lat/lon? Where can I find formula?

    Read the article

  • In database table design, how does "Virtual Goods" affect table design -- should we create an instan

    - by Jian Lin
    When we design a database table for a DVD rental company, we actually have a movie, which is an abstract idea, and a physical DVD, so for each rental, we have a many-to-many table with fields such as: TransactionID UserID DvdID RentedDate RentalDuration AmountPaid but what about with virtual goods? For example, if we let a user rent a movie online for 3 days, we don't actually have a DVD, so we may have a table: TransactionID UserID MovieID RentedDate RentalDuration AmountPaid should we create a record for each instance of "virtual good"? For example, what if this virtual good (the movie) can be authorized to be watched on 3 devices (with 3 device IDs), then should we then create a virtual good record in the VirtualGoods table, each with a VirtualGoodID and then another table that has VirtualGoodID DeviceID to match up the movie with the DeviceIDs? We can also just use the TransactionID as the VirtualGoodID. Are there circumstances where we may want to create a record to record this "virtual good" in a VirtualGoods table?

    Read the article

  • On Ruby on Rails, <%= or <% should only matter whether it is show or no show, but why will it give

    - by Jian Lin
    The following code: <div id="vote_form"> <%= form_remote_tag :url => story_votes_path(@story) do %> <%= submit_tag 'shove it' %> <% end %> </div> gives compilation error while if the first <%= is replaced with <%, then everything works. I thought they only differ by "show" or "not show", but why will it actually cause a compile error? The error is: > SyntaxError in Stories#show > > Showing > app/views/stories/show.html.erb where > line #17 raised: > > compile error C:/Software > Projects/ror/shov12/app/views/stories/show.html.erb:17: > syntax error, unexpected ')' ... > story_votes_path(@story) do ).to_s); > @output_buffer.concat ... > ^ C:/Software > Projects/ror/shov12/app/views/stories/show.html.erb:23: > syntax error, unexpected kENSURE, > expecting ')' C:/Software > Projects/ror/shov12/app/views/stories/show.html.erb:25: > syntax error, unexpected kEND, > expecting ')'

    Read the article

  • After writing SQL statements in MySQL, how to measure the speed / performance of them?

    - by Jian Lin
    I saw something from an "execution plan" article: 10 rows fetched in 0.0003s (0.7344s) How come there are 2 durations shown? What if I don't have large data set yet. For example, if I have only 20, 50, or even just 100 records, I can't really measure how faster 2 different SQL statements compare in term of speed in real life situation? In other words, there needs to be at least hundreds of thousands of records, or even a million records to accurately compares the performance of 2 different SQL statements?

    Read the article

  • Cannot get a session with Facebook app? (using its Graph API)

    - by Jian Lin
    I have really simple few lines of Facebook app, using the new Facebook API: <pre> <?php require 'facebook.php'; // Create our Application instance. $facebook = new Facebook(array( 'appId' => '117676584930569', 'secret' => '**********', // hidden here on the post... 'cookie' => true, )); var_dump($facebook); ?> but it is giving me the following output: http://apps.facebook.com/woolaladev/i2.php would give out object(Facebook)#1 (6) { ["appId:protected"]=> string(15) "117676584930569" ["apiSecret:protected"]=> string(32) "**********" <--- just hidden on this post ["session:protected"]=> NULL <--- Session is NULL for some reason ["sessionLoaded:protected"]=> bool(false) ["cookieSupport:protected"]=> bool(true) ["baseDomain:protected"]=> string(0) "" } Session is NULL for some reason, but I am logged in and can access my home and profile and run other apps on Facebook (to see that I am logged on). I am following the sample on: http://github.com/facebook/php-sdk/blob/master/examples/example.php http://github.com/facebook/php-sdk/blob/master/src/facebook.php (download using raw URL: wget http://github.com/facebook/php-sdk/raw/master/src/facebook.php ) Trying on both hosting companies at dreamhost.com and netfirms.com, and the results are the same.

    Read the article

  • When actually is a closure created?

    - by Jian Lin
    Is it true that a closure is created in the following cases for foo, but not for bar? Case 1: <script type="text/javascript"> function foo() { } </script> foo is a closure with a scope chain with only the global scope. Case 2: <script type="text/javascript"> var i = 1; function foo() { return i; } </script> same as Case 1. Case 3: <script type="text/javascript"> function Circle(r) { this.r = r; } Circle.prototype.foo = function() { return 3.1415 * this.r * this.r } </script> in this case, Circle.prototype.foo (which returns the circle's area) refers to a closure with only the global scope. (this closure is created). Case 4: <script type="text/javascript"> function foo() { function bar() { } } </script> here, foo is a closure with only the global scope, but bar is not a closure (yet), because the function foo is not invoked in the code, so no closure goo is ever created. It will only exist if foo is invoked , and the closure bar will exist until foo returns, and the closure bar will then be garbage collected, since there is no reference to it at all anywhere. So when the function doesn't exist, can't be invoked, can't be referenced, then the closure doesn't exist yet (never created yet). Only when the function can be invoked or can be referenced, then the closure is actually created?

    Read the article

  • In SQL, if we rename INNER JOIN as INTERSECT JOIN, LEFT OUTER JOIN as LEFT UNION JOIN, and FULL OUTE

    - by Jian Lin
    In SQL, the name Join gives an idea of "merging" or a sense of "union", making something bigger. But in fact, as in the other post http://stackoverflow.com/questions/2706051/in-sql-a-join-is-actually-an-intersection-and-it-is-also-a-linkage-or-a-sidew it turns out that a Join (Inner Join) is actually an Intersection. So if we think of Join = Inner Join = Intersect Join Left Outer Join = Left Union Join Full Outer Join = Full Union Join = Union Join then we always get a feel of what's happening, and maybe never forget what they are easily. In a way, we can think of Intersect as "making it less", therefore it is excluding something. That's why the name "Join" won't go with the idea of "Intersect". But in fact, both Intersect and Union can be thought of as: Union: bringing something together and merge them unconditionally. Intersect: bringing something together and merge them based on some condition. so the "bringing something together" is probably what "Join" is all about. It is like, Intersection is a "half glass of water" -- we can thinking of it as "excluding something" or as "bringing something together and accepting the common ones". So if the word "Intersect Join" is used, maybe a clear picture is there, and "Union Join" can be a clear picture too. Maybe the word "Inner Join" and "Outer Join" is very clear when we use SQL a lot. Somehow, the word "Outer" tends to give a feeling that it is "outside" and excluding something rather than a "Union".

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >