Daily Archives

Articles indexed Wednesday November 16 2011

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

  • How do I get 5.1 surround sound working on an Acer Aspire 5738ZG?

    - by kbargais_LV
    I got a problem with sound. I tried everything but no results. :( I got 3 sound ports. my daemon: # This file is part of PulseAudio. # # PulseAudio is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # PulseAudio is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with PulseAudio; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA. ## Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for ## more information. Default values are commented out. Use either ; or # for ## commenting. ; daemonize = no ; fail = yes ; allow-module-loading = yes ; allow-exit = yes ; use-pid-file = yes ; system-instance = no ; local-server-type = user ; enable-shm = yes ; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB ; lock-memory = no ; cpu-limit = no ; high-priority = yes ; nice-level = -11 ; realtime-scheduling = yes ; realtime-priority = 5 ; exit-idle-time = 20 ; scache-idle-time = 20 ; dl-search-path = (depends on architecture) ; load-default-script-file = yes ; default-script-file = /etc/pulse/default.pa ; log-target = auto ; log-level = notice ; log-meta = no ; log-time = no ; log-backtrace = 0 resample-method = speex-float-1 ; enable-remixing = yes ; enable-lfe-remixing = no flat-volumes = no ; rlimit-fsize = -1 ; rlimit-data = -1 ; rlimit-stack = -1 ; rlimit-core = -1 ; rlimit-as = -1 ; rlimit-rss = -1 ; rlimit-nproc = -1 ; rlimit-nofile = 256 ; rlimit-memlock = -1 ; rlimit-locks = -1 ; rlimit-sigpending = -1 ; rlimit-msgqueue = -1 ; rlimit-nice = 31 ; rlimit-rtprio = 9 ; rlimit-rttime = 1000000 ; default-sample-format = s16le ; default-sample-rate = 44100 ; default-sample-channels = 6 ; default-channel-map = front-left,front-right default-fragments = 8 default-fragment-size-msec = 10 ; enable-deferred-volume = yes ; deferred-volume-safety-margin-usec = 8000 ; deferred-volume-extra-delay-usec = 0

    Read the article

  • Make all text EXCEPT <input> unselectable in Internet Explorer? [migrated]

    - by Ashli
    I have a website where I want to disable users from selecting content EXCEPT for input areas. I currently have some CSS to disable user-select: -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -o-user-select: none; user-select: none; However, this does NOT cover Internet Explorer; thus, I need to implement some JavaScript: <body onselectstart="return false;"> Through CSS and JavaScript, I can make all content unselectable across all popular browsers. BUT, this code also makes areas unselectable, which is a major case of poor usability. I use CSS to make input areas selectable: -webkit-user-select: text; -khtml-user-select: text; -moz-user-select: text; -o-user-select: text; user-select: text; .. and as you might have expected, this does not cover Internet Explorer, since I used JavaScript to disable all content from being selectable. What can I do to make all content unselectable except for input areas?

    Read the article

  • How do I create a background image on web page?

    - by kasha
    I am a new designer so hopefully this question isn't too basic! How do I create a background image on a webpage for a programmer? I designed the page in photoshop and I would like to know how to send the background image (the 25% opacity buildings overlay). I would be happy to send the main image (but it is too large and I imagine would slow the site and loading time drastically). here is the link to the design... http://problemio.com/home_page_1_1.pdf

    Read the article

  • Using MLP, how to make a link to the according page in the other languages?

    - by lyle
    the question says it all, but here's a bit more detail: I help building a bilingual website using MLP on TextPattern. It's trivial to put a link to the top level page of another language, but how to put a link to the current page in another language? Eg. /en/contact should link to /de/kontakt (the same article in another language). I'm sure there are some variables somewhere that I could put into the template that would be filled with the correct links. Thankx in advance. :)

    Read the article

  • No databases showing in phpMyAdmin

    - by Thein Hla Maw
    My website is hosted in shared hosting service and is working fine with updated news stored in MySQL database. To manage the database of website, I install phpMyAdmin in a sub-folder with the same username and password used in website. When I login to phpMyAdmin, I don't see my database. phpMyAdmin is showing "No databases" in left pane. Is there any thing I need to configure in phpMyAdmin? Edited: This is the settings in config.inc.php. I can login to phpMyAdmin successfully. $cfg['Servers'][$i]['host'] = 'hostname'; $cfg['Servers'][$i]['port'] = ''; $cfg['Servers'][$i]['socket'] = ''; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['auth_type'] = 'cookie'; $cfg['Servers'][$i]['user'] = 'dbuser'; $cfg['Servers'][$i]['password'] = 'password';

    Read the article

  • Finding direction of travel in a world with wrapped edges

    - by crazy
    I need to find the shortest distance direction from one point in my 2D world to another point where the edges are wrapped (like asteroids etc). I know how to find the shortest distance but am struggling to find which direction it's in. The shortest distance is given by: int rows = MapY; int cols = MapX; int d1 = abs(S.Y - T.Y); int d2 = abs(S.X - T.X); int dr = min(d1, rows-d1); int dc = min(d2, cols-d2); double dist = sqrt((double)(dr*dr + dc*dc)); Example of the world : : T : :--------------:--------- : : : S : : : : : : T : : : :--------------: In the diagram the edges are shown with : and -. I've shown a wrapped repeat of the world at the top right too. I want to find the direction in degrees from S to T. So the shortest distance is to the top right repeat of T. but how do I calculate the direction in degreed from S to the repeated T in the top right? I know the positions of both S and T but I suppose I need to find the position of the repeated T however there more than 1. The worlds coordinates system starts at 0,0 at the top left and 0 degrees for the direction could start at West. It seems like this shouldn’t be too hard but I haven’t been able to work out a solution. I hope somone can help? Any websites would be appreciated.

    Read the article

  • How can I get into the educational market?

    - by mmyers
    I believe that my current game project is very well-suited for educational gaming; so well-suited, in fact, that I know of several different schools (one community college and at least one or two high schools) that have used versions of it at some time or another. And that's without any such marketing on my part. I'd like to expand on this part of the potential user base. But I have absolutely no experience in dealing with school administrations. How can I break into this market enough to be noticed? And on a side note, could marketing the game as educational kill the gamers market?

    Read the article

  • How can I support scrolling when using batched rendering for my tiles?

    - by dardanel
    I have tiled map 100*75 and tiles are 32*32 pixel.I want to use batching for performance .I don't figure it out , because of my game needs scrolling and every frame i draw 22*16 tiles (my screen is 20*16 tile) .I thought that batching tiles for every frame .Is it good or any suggestion? edit :to more clarify I want to use occlusion culling and batching at the same time.I thought that drawing only visible areas and batching them together .But there is a something i couldn't figure out .When scrolling screen with translate matrix , if one row become invisible , I bind new row and batch them again.Every batched objects needs to buffer again.So I batch tiles and buffer to VBO every time when one row become invisible .I don't know these way is efficient or not .This is my question .And i am open to any suggestions.

    Read the article

  • Phone complains that identical GLSL struct definition differs in vert/frag programs

    - by stephelton
    When I provide the following struct definition in linked frag and vert shaders, my phone (Samsung Vibrant / Android 2.2) complains that the definition differs. struct Light { mediump vec3 _position; lowp vec4 _ambient; lowp vec4 _diffuse; lowp vec4 _specular; bool _isDirectional; mediump vec3 _attenuation; // constant, linear, and quadratic components }; uniform Light u_light; I know the struct is identical because its included from another file. These shaders work on a linux implementation and on my Android 3.0 tablet. Both shaders declare "precision mediump float;" The exact error is: Uniform variable u_light type/precision does not match in vertex and fragment shader Am I doing anything wrong here, or is my phone's implementation broken? Any advice (other than file a bug report?)

    Read the article

  • What would be the disadvantages/risks of using AF_UNSPEC?

    - by Kiril Kirov
    From Beej's Guide to Network programming You can force it to use IPv4 or IPv6 in the ai_family field, or leave it as AF_UNSPEC to use whatever. This is cool because your code can be IP version-agnostic. As the title says - what would be the disadvantages (or risks, if any) of always using AF_UNSPEC, instead of specifying IPv4 or IPv6? Or it's only for one reason - if the version is specified, this will guarantee that this and only this version is supported? A little background - I think about adding support for IPv6 in client-server (C++) applications and both versions should be supported. So I wondered if it's fine to use AF_UNSPEC or it's better to "recognize" the address from the string and use AF_INET6 or AF_INET, depending on the address.

    Read the article

  • In Regex how to match in between the words?

    - by user828234
    I want to write the regex pattern which should match the string in between also. For example: I have writtenthe regex pattern like this ^((?!mystring).)*$ Which means match words which doesnot contain mystring. But i want regex pattern to match like this. mystringabcdfrevrgf regex matcher should return abcdfrevrgf How will i achieve this, Please help Thanks in advance. Answer: ((?!mystring)(.*))$

    Read the article

  • Zend Framework decorator subform add a class tag to DD wrapper tag

    - by Samuele
    I have this form: class Request_Form_Prova extends Zend_Form { public function init() { $this->setMethod('post'); $SubForm_Step = new Zend_Form_SubForm(); $SubForm_Step->setAttrib('class','Step'); $this->addSubform($SubForm_Step, 'Chicco'); $PrivacyCheck = $SubForm_Step->createElement('CheckBox', 'PrivacyCheck'); $PrivacyCheck->setLabel('I have read and I agre bla bla...') ->setRequired(true) ->setUncheckedValue(''); $PrivacyCheck->getDecorator('Label')->setOption('class', 'inline'); $SubForm_Step->addElement($PrivacyCheck); $SubForm_Step->addElement('submit', 'submit', array( 'ignore' => true, 'label' => 'OK', )); } } That generate this HTML: <form enctype="application/x-www-form-urlencoded" method="post" action=""> <dl class="zend_form"> <dt id="Chicco-label">&nbsp;</dt> <dd id="Chicco-element"> <fieldset id="fieldset-Chicco" class="Step"> <dl> <dt id="Chicco-PrivacyCheck-label"><label for="Chicco-PrivacyCheck" class="inline required">I have read and I agre bla bla...</label></dt> <dd id="Chicco-PrivacyCheck-element"> <input type="hidden" name="Chicco[PrivacyCheck]" value=""><input type="checkbox" name="Chicco[PrivacyCheck]" id="Chicco-PrivacyCheck" value="1"> </dd> <dt id="submit-label">&nbsp;</dt> <dd id="submit-element"> <input type="submit" name="Chicco[submit]" id="Chicco-submit" value="OK"> </dd> </dl> </fieldset> </dd> </dl> </form> How can I add a class="Test" to the <dd id="Chicco-element"> elemnt? In order to have it like that: <dd id="Chicco-element" class="Test"> I thought something like that but it don't work: $SubForm_Step->getDecorator('DdWrapper')->setOption('class', 'Test'); OR $SubForm_Step->getDecorator('DtDdWrapper')->setOption('class', 'Test'); How can I do it? And last question: How can I wrap that DD and DT element of a SubForm in another DL element? Like that: ( second line ) <dl class="zend_form"> <dl> <dt id="Chicco-label">&nbsp;</dt> <dd id="Chicco-element"> <fieldset id="fieldset-Chicco" class="Step"> <dl> .......

    Read the article

  • Virtual Inheritance Confusion

    - by alan
    I'm reading about inheritance and I have a major issue that I haven't been able to solve for hours: Given a class Bar is a class with virtual functions, class Bar { virtual void Cook(); } What is the different between: class Foo : public Bar { virtual void Cook(); } and class Foo : public virtual Bar { virtual void Cook(); } ? Hours of Googling and reading came up with lots of information about its uses, but none actually tell me what the difference between the two are, and just confuse me more. Thanks!

    Read the article

  • Codeigniter database update

    - by Carry All
    The table is like this and I want to update DecryptionDate by specify ArchiveID and RecipientID this is my code $this->load->database(); $date = date("Y-m-d H:i:s"); $data = array('DecryptionDate' => $date); $array = array('ArchiveID'=>$archiveID.'','RecipientID'=>$userID.''); $this->db->where($array); $this->db->update('log', $data); if ($this->db->affected_rows() > 0) { echo "SUCCESS"; } else { echo "FAIL"; } my problem is I can update the data only when $archiveID is 911 and $userID is test01 but the program fail to update when $archiveID is 911 and $userID is test02

    Read the article

  • Fluent Nhibernate - how do i specify table schemas when auto generating tables in SQL CE 4

    - by daffers
    I am using SQL CE as a database for running local and CI integration tests (normally our site runs on normal SQL server). We are using Fluent Nhibernate for our mapping and having it create our schema from our Mapclasses. There are only two classes with a one to many relationship between them. In our real database we use a non dbo schema. The code would not work with this real database at first until i added schema names to the Table() methods. However doing this broke the unit tests with the error... System.Data.SqlServerCe.SqlCeException : There was an error parsing the query. [ Token line number = 1,Token line offset = 26,Token in error = User ] These are the classes and associatad MapClasses (simplified of course) public class AffiliateApplicationRecord { public virtual int Id { get; private set; } public virtual string CompanyName { get; set; } public virtual UserRecord KeyContact { get; private set; } public AffiliateApplicationRecord() { DateReceived = DateTime.Now; } public virtual void AddKeyContact(UserRecord keyContactUser) { keyContactUser.Affilates.Add(this); KeyContact = keyContactUser; } } public class AffiliateApplicationRecordMap : ClassMap<AffiliateApplicationRecord> { public AffiliateApplicationRecordMap() { Schema("myschema"); Table("Partner"); Id(x => x.Id).GeneratedBy.Identity(); Map(x => x.CompanyName, "Name"); References(x => x.KeyContact) .Cascade.All() .LazyLoad(Laziness.False) .Column("UserID"); } } public class UserRecord { public UserRecord() { Affilates = new List<AffiliateApplicationRecord>(); } public virtual int Id { get; private set; } public virtual string Forename { get; set; } public virtual IList<AffiliateApplicationRecord> Affilates { get; set; } } public class UserRecordMap : ClassMap<UserRecord> { public UserRecordMap() { Schema("myschema"); Table("[User]");//Square brackets required as user is a reserved word Id(x => x.Id).GeneratedBy.Identity(); Map(x => x.Forename); HasMany(x => x.Affilates); } } And here is the fluent configuraton i am using .... public static ISessionFactory CreateSessionFactory() { return Fluently.Configure() .Database( MsSqlCeConfiguration.Standard .Dialect<MsSqlCe40Dialect>() .ConnectionString(ConnectionString) .DefaultSchema("myschema")) .Mappings(m => m.FluentMappings.AddFromAssembly(typeof(AffiliateApplicationRecord).Assembly)) .ExposeConfiguration(config => new SchemaExport(config).Create(false, true)) .ExposeConfiguration(x => x.SetProperty("connection.release_mode", "on_close")) //This is included to deal with a SQLCE issue http://stackoverflow.com/questions/2361730/assertionfailure-null-identifier-fluentnh-sqlserverce .BuildSessionFactory(); } The documentation on this aspect of fluent is pretty weak so any help would be appreciated

    Read the article

  • HTML5: Rendering absolute images using canvas

    - by Mark
    I am experimenting with canvas as part of my HTML5 introduction. This constitutes as assignment work, but I am not asking for any help on the actual coursework at all. I am trying to write a rendering engine, but having no luck because once the image is drawn on canvas it looks very distorted, and not at the right dimensions of the image itself. I have made a animation engine that loads images into an array, and then iterates through them at a certain speed. This is not the problem, and I assume is not causing the issue as this was happening when I drawn an image to the canvas. I think this is natural behaviour for images to be scaled/skewed when the window is resized, so I conquered that by simply redrawing the whole thing once the window is resized. The images I am using are isometric, and drawn at a pixel level. Would this cause the distortion? It seems setting the dimensions on the drawImage() function are not working are all. I am using JavaScript for the manipulation and rendering of the canvas. I would normally try and work it out myself, but I do not have any time to ponder why because I have no idea why it is even scaling/skewing the image once it is drawn on the canvas. I cannot share the code for obvious reasons. I should also mention, the canvas's dimension is the total width of the viewport, as I am developing a game. My question is: Has anyone encountered this and how would I correct it? Thanks for your help.

    Read the article

  • Create combined client side and server side validation in Symfony2

    - by ausi
    I think it would be very useful to create client side form validation up on the symfony2 Form and Validator components. The best way to do this would be to pass the validation constraints to the form view. With that information it would be possible to make a template that renders a form field to something like this: <div> <label for="form_email">E-Mail</label> <input id="form_email" type="text" name="form[email]" value="" data-validation-constraints='["NotBlank":{},"MinLength":{"limit":6}]' /> </div> The JavaScript part then would be to find all <input> elements that have the data-validation-constraints attribute and create the correct validation for them. To pass the validation constraints to the form view i thought the best way would be to create a form type extension. That's the point of my Question: Is this the correct way? And how is this possible? At the Moment my form type extension looks like this: use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormView; use Symfony\Component\Form\FormBuilder; class FieldTypeExtension extends \Symfony\Component\Form\AbstractTypeExtension{ public function getExtendedType(){ return 'field'; } public function buildView(FormView $view, FormInterface $form) { // at this point i didn't find a way to get the // validation constraints out of the $form // the `getAllValidationConstraints` here is just an example $view->set('validation_constraints', $form->getAllValidationConstraints()); } } How can i get all validation constraints applied to one form field out of the FormInterface object?

    Read the article

  • RCP applicatoon activities

    - by Peter
    I have a problem with my RCP application. First, I defined an activity in my plugin.xml: <extension point="org.eclipse.ui.activities"> <activity id="myproject.view.input.activity" name="myproject.view.input.activity"> <enabledWhen> <with variable="myproject.view.input.active"> <equals value="ENABLED"> </equals> </with> </enabledWhen> </activity> <activityPatternBinding activityId="myproject.view.input.activity" pattern="myproject.gui/myproject.view.input"> </activityPatternBinding> Then i defined my SourceProvider: <extension point="org.eclipse.ui.services"> <sourceProvider provider="myproject.util.CommandState"> <variable name="myproject.view.input.active" priorityLevel="workbench"> </variable> And, finally, my CommandState class: public class CommandState extends AbstractSourceProvider { public final static String OUTPUT_VIEW = "myproject.view.input.active"; // then goes some others variables, i just skip them // .... public final static String [] ACTIONS = {OUTPUT_VIEW /*and all others variables*/}; public final static String ENABLED = "ENABLED"; public final static String DISENABLED = "DISENABLED"; private final Map <String, String> currentState = new HashMap <String, String> (); @Override public void dispose() { } @Override public String[] getProvidedSourceNames() { return ACTIONS; } @Override public Map <String, String> getCurrentState() { return currentState; } public void setEnabled(boolean enabled, String [] commands) { String value = enabled ? ENABLED : DISENABLED; for (String command : commands) { currentState.put(command, value); fireSourceChanged(ISources.WORKBENCH, command, value); } } } In my Login window, application checks user permissions, and enable or disable views, commands, etc. with setEnabled method of CommandState. For commands it works fine, they are enabling or disabling correctly. But when i try to disable view and open perspective, that contains that view (myproject.view.input), it opened without that view, but also throws exception: !STACK 1 org.eclipse.ui.PartInitException: Could not create view: myproject.view.input at org.eclipse.ui.internal.ViewFactory.createView(ViewFactory.java:158) I can show full stacktrace if anyone want. I tried to debug my application and before i open my perspective whith that view, i checked currentState of my CommandState source provider, and all seemes to be ok: all variables values are correct and myproject.view.input.active = DISABLED Can anyone say, why exception is thrown? Thanks for any help. Sorry for big post and bad language

    Read the article

  • Rule not redirecting .co.uk to .com

    - by bateman_ap
    I have been trying to get my site, when a visitor goes to .co.uk to be automatically redirected to .com. As well as if they go to domain.com to be taken to www.domain.com I have the code below in my httpd.conf, it appears to be working with domain.com to www.domain.com but not domain.co.uk or www.domain.co.uk to www.domain.com RewriteEngine on RewriteBase / RewriteCond %{http_host} ^domain.com [NC,OR] RewriteCond %{http_host} ^domain.co.uk [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,NC]

    Read the article

  • jQuery object are immutable?

    - by Daniel
    Hello a new noob on jQuery here and I was wondering if jQuery objects are immutable. For example: var obj1 = $("<tag></tag>"); var obj2 = obj1.append("something"); Will obj1 and obj2 be the same meaning obj2 will reference obj1? UPDATE: The above example kind of scratches the surface of what i want to know, a more accurate question is : If i chain function from the jQuery api will they return the same object or a new one (as the case with strings in Java)?

    Read the article

  • Facebook Javascript SDK: First time logging in

    - by Brandon
    I'm currently integrating Facebook with my website using the Javascript SDK. I've got the login portion working well. The only thing I'm trying to figure out is if there is a way to tell if it was the first time the user logged into my website using their Facebook credientials. I tried subscribing to auth.login, but that didn't seem to have any information about that. Is there a flag anywhere that lets me know this? Or another way to go about looking this up? I realize I could do some server side code, but I'd prefer to stay away from that if possible. Thanks in advance, Brandon

    Read the article

  • CakePHP: Need help using saveField to update a fields in a belongsTo model

    - by afrisch
    I am trying to update a password into two different models/tables in CakePHP. I can update it fine in the parent model, but not the second model. Models: Users (hasOne GameProfile) PK=id Gameprofiles (belongsTo User) FK=user_id Here is a stripped down version of my function in the Users_controller.php: function updatepass() { if (!empty($this->data)) { $this->User->id = $this->Auth->user('id'); $this->User->saveField('sha1password', $this->Auth->password($this->data['User']['newpass'])); $this->User->Gameprofile->saveField('plainpassword', $this->data['User']['newpass']); } } When I execute the function, the users table is updated fine. But the gameprofile table is not updated, rather Cake does an insert. SQL Query Log: 1195 Query UPDATE `users` SET `sha1password` = 'e9443e9f5e1a07832aad1b2f84de1a666daf89b5' WHERE `users`.`id` = 30 1195 Query INSERT INTO `gameprofiles` (`plainpassword`) VALUES ('abc') Is there a way to get CakePHP to do an update using saveField on a model with a belongsTo attribute? I've tried various ways to refer to user_id before executing the second saveField, but just can't seem to find the winning combination. Any help is greatly appreciated!

    Read the article

  • Disallow using comma operator

    - by RiaD
    I never use the comma operator. But sometimes, when I write some recursions, I make a stupid mistake: I forget the function name. That's why the last operand is returned, not the result of a recursion call. Simplified example: int binpow(int a,int b){ if(!b) return 1; if(b&1) return a*binpow(a,b-1); return (a*a,b/2); // comma operator } Is it possible get a compilation error instead of incorrect, hard to debug code?

    Read the article

  • Linq to SQL Repository ~theory~ - Generic but now uses Linq to Objects?

    - by Matt Tolliday
    The project I am currently working on used Linq to SQL as an ORM data access technology. Its an MVC3 Web app. The problem I faced was primarily due to the inability to mock (for testing) the DataContext which gets autogenerated by the DBML designer. So to solve this issue (after much reading) I refactored the repository system which was in place - single repository with seperate and duplicated access methods for each table which ended up with something like 300 methods only 10 of which were unique - into a single repository with generic methods taking the table and returning more generic types to the upper reaches of the application. My question revolves more around the design I've used to get thus far and the differences I'm noticing in the structure of the app. 1) Having refactored the code from the dark ages which used classic Linq to SQL queries: public Billing GetBilling(int id) { var result = ( from bil in _bicDc.Billings where bil.BillingId == id select bil).SingleOrDefault(); return (result); } it now looks like: public T GetRecordWhere<T>(Expression<Func<T, bool>> predicate) where T : class { T result; try { result = _dataContext.GetTable<T>().Where(predicate).SingleOrDefault(); } catch (Exception ex) { throw ex; } return result; } and is used by the controller with a query along the lines of: _repository.GetRecordWhere<Billing>(x => x.BillingId == 1); which is fine, and precisely what I wanted to achieve. ...however.... I'm also having to do the following to get precisely the result set i require in the controller class (the highest point of the app in essence)... viewModel.RecentRequests = _model.GetAllRecordsWhere<Billing>(x => x.BillingId == 1) .Where(x => x.BillingId == Convert.ToInt32(BillingType.Submitted)) .OrderByDescending(x => x.DateCreated). Take(5).ToList(); This - as far as my understanding is correct - is now using Linq to Objects rather than the Linq to SQL queries I was previously? Is this okay practise? It feels wrong to me but I dont know why. Probably because the logic of the queries is in the very highest tier of the app, rather than the lowest, but... I defer to you good people for advice. One of the issues I considered was bringing the entire table into memory but I understand that using the Iqeryable return type the where clause is taken to the database and evaluated there. Thus returning only the resultset i require... i may be wrong. And if you've made it this far, well done. Thank you, and if you have any advice it is very much appreciated!!

    Read the article

  • copy text layer in photoshop without text changes

    - by xhewahir
    I have some text in Photoshop, which I want to use in the web page as image, to save the special font, which is not supported by the browser. When I try to copy the text layer to a new document in Photoshop, so that I can save it as a separate image file, the text appears very bold, different from the text in the original file. p.s.: I copy the text layer using: select layer - right click - duplicate layer - to new document;

    Read the article

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