Search Results

Search found 543 results on 22 pages for 'rating'.

Page 9/22 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Too Many Left Outer Joins in Entity Framework 4?

    - by Adam
    I have a product entity, which has 0 or 1 "BestSeller" entities. For some reason when I say: db.Products.OrderBy(p = p.BestSeller.rating).ToList(); the SQL I get has an "extra" outer join (below). And if I add on a second 0 or 1 relation ship, and order by both, then I get 4 outer joins. It seems like each such entity is producing 2 outer joins rather than one. LINQ to SQL behaves exactly as you'd expect, with no extra join. Has anyone else experienced this, or know how to fix it? SELECT [Extent1].[id] AS [id], [Extent1].[ProductName] AS [ProductName] FROM [dbo].[Products] AS [Extent1] LEFT OUTER JOIN [dbo].[BestSeller] AS [Extent2] ON [Extent1].[id] = [Extent2].[id] LEFT OUTER JOIN [dbo].[BestSeller] AS [Extent3] ON [Extent2].[id] = [Extent3].[id] ORDER BY [Extent3].[rating] ASC

    Read the article

  • how topass value to controller??

    - by rajesh
    hi all, actuallly when i trying to pass url value to controller action, action is not getting the required value... i ma sending the value like this function value(url,id) { alert(url); document.getElementById('rating').innerHTML=id; var params = 'artist='+id; alert(params); // var newurl='http://localhost/songs_full/public/eslresult/ratesong/userid/1/id/27'; var myAjax = new Ajax.Request(newurl,{method: 'post',parameters:params,onComplete: loadResponse}); //var myAjax = new Ajax.Request(url,{method:'POST',parameters:params,onComplete: load}); //alert(myAjax); } function load(http) { alert('success'); } and in controller i hav write like public function ratesongAction() { $user=$_POST['rating']; echo $user; $post= $this->getRequest()->getPost(); //echo $post; $ratesongid= $this->_getParam('id'); but still not getting the result i am using zend framework

    Read the article

  • Database indexes - what should they be

    - by WebweaverD
    Most of my database tables have a clear unique index through which lookups are done 90% of the time but I am a bit unsure on this one - I have a table which keeps track of user rating totals for items in my database, I now want to add another table, to track individual ratings with an ip address column to make sure no one can rate something twice. Since I can see this becoming a big, high use table it is important to optimize it correctly. (MYSQL table) This table will have the following fields: rating_id(always - unique), item_id (always - not unique), user_id (optional - not unique), ip_address (always - not unique), rating_value(always - not unique), has_review(bool) Now I envisions 90% the queries going something like this: When a user rates something - select where item_id = x and ip_address = y, (if rows = 0) insert rating When in user account pages - select where ip_address = x or username = y Now none of the fields searched on are unique, can I still use them as indexes (for example item _id and ip_address), can I have two indexes and will this still improve performance over a non indexed table?

    Read the article

  • VB.net Need Text Box to Only Accept Numbers

    - by Rico Jackson
    I'm fairly new to VB.net (self taught) and was just wondering if someone out there could help me out with some code. I'm not trying to do anything to invovled, just have a textbox that takes numeric value from 1 to 10. I don't want it to take a string or any number above 10. If some types a word or character an error message will appear, telling them to enter a valid number. This is what I have, obviously it's not great as I am having problems. Thanks again to anyone who can help. If TxtBox.Text > 10 Then MessageBox.Show("Please Enter a Number from 1 to 10") TxtBox.Focus() ElseIf TxtBox.Text < 10 Then MessageBox.Show("Thank You, your rating was " & TxtBox.Text) Total = Total + 1 ElseIf IsNumeric(TxtBox.Text) Then MessageBox.Show("Thank you, your rating was " & ValueTxtBox.Text) End If ValueTxtBox.Clear() ValueTxtBox.Focus()

    Read the article

  • Rails - Create form fields dynamically and save them

    - by Frexuz
    Im building an ad-system where users can dynamically create 'fields' for each ad type. My models and example values: AdType: | id | name |----|----- | 1 | Hotel | 2 | Apartment AdOption: | id | ad_type_id | name |----|------------|----- | 1 | 1 | Star rating | 2 | 1 | Breakfast included? | 3 | 2 | Number of rooms AdValue: (Example after saving) | id | ad_id | ad_option_id | value |----|-------|---------------|------ | 1 | 1 | 1 (stars) | 5 | 2 | 1 | 2 (breakfast) | true Ad: (Example after saving) | id | description | etc.... |----|-----------------|-------- | 1 | very nice hotel | ....... So lets say I want to create a new ad, and I choose Hotel as the ad type. Then I need my view to dynamically create fields like this: (I'm guessing?) [Label] Star rating: [hidden_field :ad_id] [hidden_field :ad_option_id] [text_field :value] [Label] Breakfast included? [hidden_field :ad_id] [hidden_field :ad_option_id] [text_field :value] And also, how to save the values when the ad record is saved I hope this is understandable. If not just ask and I'll try to clarify.

    Read the article

  • Criticise/Recommendations for my code

    - by aLk
    Before i go any further it would be nice to know if there is any major design flaws in my program so far. Is there anything worth changing before i continue? Model package model; import java.sql.*; import java.util.*; public class MovieDatabase { @SuppressWarnings({ "rawtypes", "unchecked" }) public List queryMovies() throws SQLException { Connection connection = null; java.sql.Statement statement = null; ResultSet rs = null; List results = new ArrayList(); try { DriverManager.registerDriver(new com.mysql.jdbc.Driver()); connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "password"); statement = connection.createStatement(); String query = "SELECT * FROM movie"; rs = statement.executeQuery(query); while(rs.next()) { MovieBean bean = new MovieBean(); bean.setMovieId(rs.getInt(1)); bean.setTitle(rs.getString(2)); bean.setYear(rs.getInt(3)); bean.setRating(rs.getInt(4)); results.add(bean); } } catch(SQLException e) { } return results; } } Servlet public class Service extends HttpServlet { @SuppressWarnings("rawtypes") protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("Movies!"); MovieDatabase movies = new MovieDatabase(); try { List results = movies.queryMovies(); Iterator it = results.iterator(); while(it.hasNext()) { MovieBean movie = new MovieBean(); movie = (MovieBean)it.next(); out.println(movie.getYear()); } } catch(SQLException e) { } } } Bean package model; @SuppressWarnings("serial") public class MovieBean implements java.io.Serializable { protected int movieid; protected int rating; protected int year; protected String title; public MovieBean() { } public void setMovieId(int movieidVal) { movieid = movieidVal; } public void setRating(int ratingVal) { rating = ratingVal; } public void setYear(int yearVal) { year = yearVal; } public void setTitle(String titleVal) { title = titleVal; } public int getMovieId() { return movieid; } public int getRating() { return rating; } public int getYear() { return year; } public String getTitle() { return title; } }

    Read the article

  • is it safe to refactor my django models?

    - by Johnd
    My model is similar to this. Is this ok or should I make the common base class abstract? What are the differcenes between this or makeing it abstract and not having an extra table? It seems odd that there is only one primary key now that I have factored stuff out. class Input(models.Model): details = models.CharField(max_length=1000) user = models.ForeignKey(User) pub_date = models.DateTimeField('date published') rating = models.IntegerField() def __unicode__(self): return self.details class Case(Input): title = models.CharField(max_length=200) views = models.IntegerField() class Argument(Input): case = models.ForeignKey(Case) side = models.BooleanField() is this ok to factor stuff out intpu Input? I noticed Cases and Arguments share a primary Key. like this: CREATE TABLE "cases_input" ( "id" integer NOT NULL PRIMARY KEY, "details" varchar(1000) NOT NULL, "user_id" integer NOT NULL REFERENCES "auth_user" ("id"), "pub_date" datetime NOT NULL, "rating" integer NOT NULL ) ; CREATE TABLE "cases_case" ( "input_ptr_id" integer NOT NULL PRIMARY KEY REFERENCES "cases_input" ("id"), "title" varchar(200) NOT NULL, "views" integer NOT NULL ) ; CREATE TABLE "cases_argument" ( "input_ptr_id" integer NOT NULL PRIMARY KEY REFERENCES "cases_input" ("id"), "case_id" integer NOT NULL REFERENCES "cases_case" ("input_ptr_id"), "side" bool NOT NULL )

    Read the article

  • Sending JSON content type in from JavaScript objects ( jQuery ajax )

    - by smartnut007
    I am having trouble sending JavaScript objects as a http request that only accepts json content-type. i.e "application/json" or "text/json" But, I am not sure why data2 ( stringified json ) works fine But, data1 ( json object ) does throws 400 ( Bad Request ). i.e I am not sure jQuery does not serialize the json object to a valid json string for the server to process. var data1 = ({ rating : 3 }); //does not work var data2 = '{ "rating" : 3}'; //works fine $.ajax({ url : "/rate", data : data1, type : "POST", contentType: "application/json", success: function(json){ console.log("Ajax Return :"+json); } });

    Read the article

  • In-App review feature in iPhone App

    - by boreas
    I have recently seen in some Apps that review and rating (with 5 stars) can be integrated into the app. Does anyone have an idea how this is done? e.g. with a http request? More specific: Can I create a view in my App with a UITextField and a Button, so that when the user writes his review in the textfield and click send, the review should be posted to the "Customer Reviews" in the App Store? and the rating should also be done inside the App similarly.

    Read the article

  • how to redirect on youtube in androi

    - by rajshree
    public class MovieDescription extends Activity { Vibrator vibrator; TextView tv_title,tv_year,tv_banner,tv_desc; RatingBar ratingBar; ImageView iv_watch,iv_poster; private static final String TAG_CONTACTS = "Demo"; private static final String TAG_ID = "id"; private static final String TAG_TITLE = "title"; private static final String TAG_YEAR = "year"; private static final String TAG_RATING = "rating"; private static final String TAG_BANNER= "category"; private static final String TAG_DESC = "description"; private static final String TAG_URL = "url"; private static final String TAG_POSTER = "poster"; String id,title,year,rating,banner,description,poster, movieUrl; static JSONArray contacts = null; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.movie_description); initialize(); String movieDescUrl = "http://vaibhavtech.com/work/android/movie_description.php?id="+MainActivity.movie_Id; MovieDescriptionParser jParser = new MovieDescriptionParser(); JSONObject json = jParser.getJSONFromUrl(movieDescUrl); try { contacts = json.getJSONArray(TAG_CONTACTS); for (int i = 0; i < contacts.length(); i++) { /**********************************Value Parse FromUrl**********************************/ JSONObject c = contacts.getJSONObject(i); id = c.getString(TAG_ID); title = c.getString(TAG_TITLE); year = c.getString(TAG_YEAR); rating = c.getString(TAG_RATING); banner=c.getString(TAG_BANNER); description = c.getString(TAG_DESC); movieUrl = c.getString(TAG_URL); poster = c.getString(TAG_POSTER); /**********************************Valeu Assing to UI Component**********************************/ Log.i(id, title); } } catch (JSONException e) { e.printStackTrace(); } tv_title.setText(title); tv_year.setText(year); tv_banner.setText(banner); tv_desc.setText(description); Float rat=Float.parseFloat(rating); ratingBar.setRating(rat); Bitmap bimage= getBitmapFromURL("http://vaibhavtech.com/work/android/admin/upload/"+poster); iv_poster.setImageBitmap(bimage); iv_watch.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub vibrator.vibrate(40); LayoutInflater inflater=getLayoutInflater(); View view=inflater.inflate(R.layout.customtoast,(ViewGroup)findViewById(R.id.custom_toast_layout)); Toast toast=new Toast(getApplicationContext()); toast.setDuration(Toast.LENGTH_LONG); toast.setGravity(Gravity.CENTER_HORIZONTAL, 0, 0); toast.setView(view); toast.show(); Intent intent=new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(movieUrl)); startActivity(intent); } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { // TODO Auto-generated method stub int currentapiVersion = android.os.Build.VERSION.SDK_INT; Log.i("Device Versoin is", ""+currentapiVersion); if (currentapiVersion >= android.os.Build.VERSION_CODES.JELLY_BEAN){ ActionBar actionBar = getActionBar(); actionBar.setHomeButtonEnabled(true); actionBar.setDisplayHomeAsUpEnabled(true); getMenuInflater().inflate(R.menu.main, menu); } return super.onCreateOptionsMenu(menu); } @Override public boolean onOptionsItemSelected(MenuItem item) { // TODO Auto-generated method stub switch (item.getItemId()) { case android.R.id.home: onBackPressed(); return true; case R.id.home: Intent intent = new Intent(this, MainActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent); Log.i("Home", "Press"); return true; } return super.onOptionsItemSelected(item); } public void initialize() { tv_banner=(TextView) findViewById(R.id.tv_movie_description_banner); tv_desc=(TextView) findViewById(R.id.tv_movie_description_decription); tv_title=(TextView) findViewById(R.id.tv_movie_description_name); tv_year=(TextView) findViewById(R.id.tv_movie_description_year); ratingBar=(RatingBar) findViewById(R.id.ratingBar1); iv_watch=(ImageView) findViewById(R.id.iv_movie_description_watch); iv_poster=(ImageView) findViewById(R.id.iv_movie_description_poster); vibrator=(Vibrator)getSystemService(Context.VIBRATOR_SERVICE);; } public static Bitmap getBitmapFromURL(String src) { try { Log.i("src",src); URL url = new URL(src); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setDoInput(true); connection.connect(); InputStream input = connection.getInputStream(); Bitmap myBitmap = BitmapFactory.decodeStream(input); Log.i("Bitmap","returned"); return myBitmap; } catch (IOException e) { e.printStackTrace(); Log.e("Exception",e.getMessage()); return null; } } } when i am clciking on watch now button its giving me 4 options -by mozilz,by chrome,by youtube, i want that when i click on watch now button it get redirect on youtube url link,..how can i do this please give me any suggetion.:(

    Read the article

  • Android ratings and listviews

    - by puppetmaster04
    I'd like to add a list of reviews of books to my Android app. Basically what I'm after is a fixed rating using the RatingBar and a ListView containing the snippet of the review for each review. Once clicked I want the list item to expand and fill with the text of the full review. I have the content of the snippet, full text, and rating, but don't know how best to go about the layout. Any ideas are ok, I don't need full code, but I would much prefer to keep it to XML layout.

    Read the article

  • Book Review: The Art of XSD - SQL Server XML schemas

    The 14 chapters of "The Art of XSD”, written by MVP Jacob Sebastian, will take the reader step-by–step all the way from the basics of XML Schema design all the way to advanced topics on SQL Server XML Schema Collections. Reviewer Hima Bindu Vejella gives it an 8/10 rating, and gives us an excellent distilled description of what the book has to offer.

    Read the article

  • Book Review: The Art of XSD - SQL Server XML schemas

    The 14 chapters of "The Art of XSD, written by MVP Jacob Sebastian, will take the reader step-bystep all the way from the basics of XML Schema design all the way to advanced topics on SQL Server XML Schema Collections. Reviewer Hima Bindu Vejella gives it an 8/10 rating, and gives us an excellent distilled description of what the book has to offer....Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Ranking Part III

    - by PointsToShare
    © 2011 By: Dov Trietsch. All rights reserved   Ranking Part III In a previous blogs “Ranking an Introduction” and  “Ranking Part II” , you have already praised me in “Rank the Author” and learned how to create a new element on a page and how to place it where you need it. For this installment, I just added code to keep the number of votes (you vote by clicking one of the stars) and the total vote. Using these two, we can compute the average rating. It’s a small step, but its purpose is to show that we do not need a detailed history in order to compute the average. A running total is sufficient. Please note that once you close the game, you will lose your previous total. In real life, we persist the totals in the list itself. We also keep a list of actual votes, but its purpose is to prevent double votes. If a person has already voted, his user id is already on the list and our program will check for it and bar the person from voting again. This is coded in an event receiver, which is a SharePoint server piece of code. I will show you how to do this part in a subsequent blog. Again, go to the page and look at the code. The gist of it is here. avg, votes, and stars are global variables that I defined before. function sendRate(sel){//I hate long line so I created pieces of the message in their own vars            var s1 = "Your Rating Was: ";            var s2 = ".. ";            var s3 = "\nVotes = ";            var s4 = "\nTotal Stars = ";            var s5 = "\nAverage = ";            var s;            s = parseInt(sel.id.replace("_", '')); // Get the selected star number            votes = parseInt(votes) + 1;            stars = parseInt(stars) + s;            avg = parseFloat(stars) / parseFloat(votes);            alert(s1 + sel.id + s2 +sel.title + s3 + votes + s4 + stars + s5 + avg);} Click on the link to play and examine “Ranking with Stats” That’s all folks!

    Read the article

  • Update: Super Hero

    While I was looking for a completely different article back in 2007, I came across my Super Hero & Super Villain rating... Well, it was time for an update: Your Super Hero results: You are Spider-Man Spider-Man 75% Supergirl 70% Green Lantern 70% Robin 57% The Flash 55% Hulk 50% Catwoman 50% Superman 45% Batman 40% Wonder Woman 40% Iron Man 40% You are intelligent, witty, a bit geeky and have great power and responsibility. Click here to take the Superhero Personality Test

    Read the article

  • Coffee, Tea, Etc. (Mae Hong Son, Thailand)

    Rating: When we were on our initial conference call with AJWS and the other SE Asia volunteers, one of the questions asked was, can I get good coffee? The response was something to the effect of this volunteering assignment is a good opportunity to kick your coffee habit. While Lauren and I certainly appreciate a [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • On Page SEO - The Leap To Google First Page

    Besides your accurate and descriptive content, you also make sure that your title contains at least one tested keyword and a convincing meta-description tag. You could say that when your landing page gets an 85% rating, your SEO job has been completed and you are free to undertake other facets of your e-business that may be waiting for your attention.

    Read the article

  • Determining Keyword Difficulty

    There's nothing worse than optimizing for a search phrase that has high search volume but not ranking in the top 10 for the search and missing out on all the traffic. Without a rating for the difficulty of a keyword, there is no way to know if you're wasting your time pursuing traffic from a search term that you have no chance of ever ranking for.

    Read the article

  • seo in relation to web-hosting [closed]

    - by jimmy obonyo
    Possible Duplicate: Does changing web hosting server affects SEO page ranking? I have two websites.one of the site though vigorous attempts to search optimize to certain google keywords or even the site name still performs poorly,while the other site does actually perform better and better.the two sites are hosted by different hosting companies...one bytehost.net the other by youhosting.com.So here is my question,does anyone know if there any relation of hosting company with indexing or not, and if there is a relationship how to choose a good company to get better seo indexing ,rating

    Read the article

  • SEO Secrets - Fighting Against the Domain Age Tide

    There are a whole range of tactics you can adopt to improve your rankings in the search engines. Using well researched and optimised keyword phrases and creating quality backlinks are the obvious methods. You do need to be aware of the age of your domain however and how that can effect your site's perceived trust rating in the search engines.

    Read the article

  • A Few SEO Tips to Get Your Business Going

    Before I tell you various SEO tips that can take your online business to heights, let me first explain you what is SEO and how is using SEO tips beneficial for your online business. SEO stands for Search Engine Optimization and it is a process for improving the rating, volume and quality of web traffic for your web site or a web page in various popular search engines using paid or un-paid techniques. There would be no online business owner that would not want to have more and more traffic to his/her website.

    Read the article

  • Knowing the Search Engine Process to Improve SEO

    In order to begin your Search Engine Optimization you must first know how search engines work, whether or not you hire an SEO Consultant. It's important to know what you are trying to attract, as well as how search engines find their pages and determine their rating. There are several steps that are part of a search engines process until they get the results pop up on a searchers screen.

    Read the article

  • Inputting Visual Extras in Your Webpage and SEO

    If you or your SEO consultant plan on having a successful website that is ranked high and recognized by search engines and crawlers, make sure that you review the below points to different visual extras that may be put into your website and possibly affect its rating. It's good Search Engine Optimization to have an attractive website, however, too many, and in some cases, any of these visual extras may actually hurt your website.

    Read the article

  • Patch Tuesday Fixes, Valentine`s Scams

    Microsoft plans to release nine bulletins on Tuesday that cover 21 vulnerabilities across its wide portfolio of products. Of the nine bulletins, four have been tagged with the software giant's critical rating, meaning they should be given the utmost importance with regard to the overall patching process exercised by users and organizations. The four critical updates address vulnerabilities in Microsoft's Internet Explorer browser, its Windows operating system, and Silverlight. As for the remaining five updates, Microsoft has labeled them as being important. Those will cover issues foun...

    Read the article

  • Stupidly Simple SEO - Best Course

    In the event you require to succeed at web marketing, everything comes down to SEO. That is why there's so plenty of programs out there dedicated to rating well in the search engines. But none of them focus on the way you ought to go about doing it. They have an inclination to be lacking in the kind of specific information you need.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >