Daily Archives

Articles indexed Saturday January 15 2011

Page 19/28 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • windows 7 taskbar pin custom shortcuts to jumplist

    - by stijn
    For example I have TightVNC Viewer pinned to taskbar, it does not allow a jumplist (pinning multiple items or storing recent items). However I have a couple of shortcuts to vncviewer.exe that take arguments. Is there a way to get these in a jumplist for the vncviewer taskbar icon anyway? Found jumplist launcher already, but it's not exactly what I'm after + it's buggy (cannot add arguments to the exe)

    Read the article

  • How to convince my boss to improve code quality?

    - by Vimvq1987
    The place I'm working for is a service provider. We have a lot of services, which are written to deal with deadline, so their code are really terrible: No coding convention, everyone codes in his own style No unit testing (which is really bad) No refactoring (which is truly worse) No automation build/deployment etc and these code are used again and again, so bad code continue to spread all over my department. I really want to set up a standard quality for our code, by requiring everyone to follow "rules": every line of code which does not follow convention will be rejected, and every function of code which does not pass unit testing will not be committed,...But I don't know how to convince my boss to allow me to do this. I'm relatively new comer, so inspiring people from my works is really hard, and I think it's easier if my boss support me to this. Thank you very much for your advices

    Read the article

  • Can you tell whether I have a hardware or software problem with a DVD-ROM drive?

    - by user8934
    Trying to copy the content of a DVD on a Asrock ION 330 running Maverick, i.e. with: dd if=/dev/sr0 of=dvdcopy ...I get errors in /var/log/messages: Jan 15 17:18:15 asrock kernel: [ 2616.445966] sr 1:0:0:0: [sr0] Unhandled sense code Jan 15 17:18:15 asrock kernel: [ 2616.445975] sr 1:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE Jan 15 17:18:15 asrock kernel: [ 2616.445984] sr 1:0:0:0: [sr0] Sense Key : Medium Error [current] Jan 15 17:18:15 asrock kernel: [ 2616.445994] sr 1:0:0:0: [sr0] Add. Sense: Id CRC or ECC error Jan 15 17:18:15 asrock kernel: [ 2616.446004] sr 1:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 02 00 00 02 00 I'd tell it is a hardware problem, but it happens with various DVDs and on a second PC, also running Maverick... Both the PCs previously ran Lucid, same problems.

    Read the article

  • Maxtor OneTouch Hardisk Not Recognised

    - by user8960
    I have a Maxtor OneTouch External Harddisk 160gb that i purchased recently. At first my Ubuntu 10.10 could not mount it. I opened disk utility which recognized it but with no filesystem. I proceeded to try formatting it but this error popped up Blockquote Error creating partition table: helper exited with exit code 1: Error calling fsync(2) on /dev/sdb: Input/output error Blockquote I resorted to Gparted. Things turned worse; it wasn't even listed in the list of devices. Does anyone have a solution to this problem? Any help is appreciated.

    Read the article

  • How to implement dual communication between server and client via http

    - by Alex Sebastiano
    I have a AJAX client which must receive messages from server. Some messages from server not like request-response type. For example, imaging game in which players can enter. Server must send to client info about player entering. But how can server send message to client via http without request from client? Only decision that i can invent: client send request to server (getNewPlayerEnter request) with big timeout, server checks state of player set, if in set new players are, then server send info to client, if not server 'sleeps' on some time, and after 'sleeping' server checks players set again. I think my desicion a little stupid(maybe not little). How implement it right? p.s. sorry for my english

    Read the article

  • Read from file hexadecimal number and change their representation style

    - by user576844
    I want to write a program changing the notation of all hexadecimal numbers found in an assembly source file from traditional (h) to C-style (0x). I have started the coding part but am not sure how can I detect the hexadecimal numbers and eventually change the style and save it back in the file... I have started writing the program.. ## Mips program - .data fin: .ascii "" # filename for input msg0: .asciiz "aaaa" msg1: .asciiz "Please enter the input file name:" buffer: .asciiz "" .text #----------------------- li $v0, 4 la $a0, msg1 syscall li $v0, 8 la $a0, fin li $a1, 21 syscall jal fileRead #read from file move $s1, $v0 #$t0 = total number of bytes li $t0, 0 # Loop counter loop: bge $t0, $s1, end #if end of file reached OR if there is an error in the file lb $t5, buffer($t0) #load next byte from file jal checkhexa #check for hexadecimal numbers addi $t0, $t0, 1 #increment loop counter j loop end: jal output jal fileClose li $v0, 10 syscall fileRead: # Open file for reading li $v0, 13 # system call for open file la $a0, fin # input file name li $a1, 0 # flag for reading li $a2, 0 # mode is ignored syscall # open a file move $s0, $v0 # save the file descriptor # reading from file just opened li $v0, 14 # system call for reading from file move $a0, $s0 # file descriptor la $a1, buffer # address of buffer from which to read li $a2, 100000 # hardcoded buffer length syscall # read from file jr $ra Any help would be appreciated.

    Read the article

  • Building static (but complicated) lookup table using templates.

    - by MarkD
    I am currently in the process of optimizing a numerical analysis code. Within the code, there is a 200x150 element lookup table (currently a static std::vector < std::vector < double ) that is constructed at the beginning of every run. The construction of the lookup table is actually quite complex- the values in the lookup table are constructed using an iterative secant method on a complicated set of equations. Currently, for a simulation, the construction of the lookup table is 20% of the run time (run times are on the order of 25 second, lookup table construction takes 5 seconds). While 5-seconds might not seem to be a lot, when running our MC simulations, where we are running 50k+ simulations, it suddenly becomes a big chunk of time. Along with some other ideas, one thing that has been floated- can we construct this lookup table using templates at compile time? The table itself never changes. Hard-coding a large array isn't a maintainable solution (the equations that go into generating the table are constantly being tweaked), but it seems that if the table can be generated at compile time, it would give us the best of both worlds (easily maintainable, no overhead during runtime). So, I propose the following (much simplified) scenario. Lets say you wanted to generate a static array (use whatever container suits you best- 2D c array, vector of vectors, etc..) at compile time. You have a function defined- double f(int row, int col); where the return value is the entry in the table, row is the lookup table row, and col is the lookup table column. Is it possible to generate this static array at compile time using templates, and how?

    Read the article

  • $query returns results but not the ones i want: $query looks good to me :S

    - by Toni Michel Caubet
    I'll start again, Lets say My data is: Table element (id,name,....) 1, name element 1, .... 2, name element 2, .... 3, name element 3, .... Table tags (id,name,id_element, ....) 1, happy , 1 2, result, 1 3, very , 1 4, element, 2 5, another, 3 6, element, 1 7, happy, 2 So if search is 'very, happy,element,result': Results i would like 1) element with id = 2 because it has all tags 2) element with id = 1 because it has the tag 'element' and the tag 'happy' (only 2 less taggs) 3) .... (only 3 less taggs) So if search is 'happy,element': Results i would like 1) element with id = 1 because it has all tags (and no more) 2) element with id = 2 because it has the tag 'element' and the tag 'happy' (and two more tags) 3) .... and 3 more tags This is an echo to my query: (it doesn't fit al requirements i wrote, but its first test to find with matched tags) SELECT element.id as id_deseada,tagg.* FROM element,tagg WHERE tagg.id_element = element.id AND tagg.nombre IN ('happy','tagg','result') GROUP BY tagg.id_element ORDER BY element.votos This returns 10 duplicated elements... :S and doen't even have all taggs (and on database there are taggs with 'happy' results) if it helps, thats how i get the elements of a tag (by name and with only one tagg) $query = "SELECT element.id FROM element,tagg WHERE tagg.nombre = '$nombre_tagg' AND tagg.id_element = element.id AND lan = '$lan' GROUP BY tagg.id_element"; I hope it's a bit easier to understand now, excuse my english.. :) Thanks a lot for you possible aportation!

    Read the article

  • What can I use the Google App Engine for?

    - by Sergio Boombastic
    This question possibly doesn't belong here. We'll see how the answers pan out, if this doesn't belong here please move it to where it belongs. I'm following the getting started guide for Google App Engine, and I'm seeing what it can and can't do. Basically, I'm seeing it's very similar to an MVC pattern. You create your model, then create a View that uses that Model to display information. Not only that, but it uses a controller of some kind in this fashion: application = webapp.WSGIApplication( [('/', MainPage)], debug=True) My question is, why would you use this Google App Engine if it's the same as using a number of other MVC frameworks? Is the only benefit you gain the load balancing being handled by Google automagically? What is a good example of something you would need the App Engine for? I'm trying to learn, so thanks for the discussion.

    Read the article

  • How does Process Explorer enumerate all process names from an XP Guest account?

    - by Joe
    I'm attempting to enumerate all running process EXE names, and have stumbled when attempting this on the XP Guest account. I am able to enumerate all Process IDs using EnumProcesses, but when I attempt OpenProcess with PROCESS_QUERY_INFORMATION Or PROCESS_VM_READ, the function fails. I fired up Process Explorer under the XP Guest account, and it was able to enumerate all process names (though as expected, most other information from processes outside the Guest user-space was not present). So, my question is, how can I duplicate the Process Explorer magic to get the process names of services and other processes running outside the Guest account user-space?

    Read the article

  • Mysql / Django - Begin auto increment to 1

    - by ark
    Hi, I have a django script which loads data, the beginning of the script deletes all datas in database. So when I execute 1st time this script, the auto increment primary keys begin to 1 to 15 (if 15 objects) and if I want to reload data, I reexecute the script. My issue is when I execute it again, pks numbers begin to 16 (for 2nd launch), I would like each time auto_increment begins to 1, is it possible whitout regenerating tables structure each time ? Thanks

    Read the article

  • AppFabric serialization problem.

    - by jandark
    I am trying cache a class instance with AppFabric but it return class instance with empty members. The reason is DataContract Attribute. My class is marked with [Serializable] and [DataContract(Name = "TestClass", Namespace = "CustomNameSpace.TestClass")] attributes. Problem solving if I mark all properties with DataMember or remove DataContract attribute. But I do not want to remove DataContract attributte because of other serialization needs (such as json or something else) Or I do not want to add DataMember attribute to other classes. (a lot of) Do you have any idea to solve that problem ? Thanks.

    Read the article

  • [MySQL] Optimize Query

    - by bordeux
    Hello. I have problem with optimize this query: SET @SEARCH = "dokumentalne"; SELECT SQL_NO_CACHE `AA`.`version` AS `Version` , `AA`.`contents` AS `Contents` , `AA`.`idarticle` AS `AdressInSQL` , `AA` .`topic` AS `Topic` , MATCH (`AA`.`topic` , `AA`.`contents`) AGAINST (@SEARCH) AS `Relevance` , `IA`.`url` AS `URL` FROM `xv_article` AS `AA` INNER JOIN `xv_articleindex` AS `IA` ON ( `AA`.`idarticle` = `IA`.`adressinsql` ) INNER JOIN ( SELECT `idarticle` , MAX( `version` ) AS `version` FROM `xv_article` WHERE MATCH (`topic` , `contents`) AGAINST (@SEARCH) GROUP BY `idarticle` ) AS `MG` ON ( `AA`.`idarticle` = `MG`.`idarticle` ) WHERE `IA`.`accepted` = "yes" AND `AA`.`version` = `MG`.`version` ORDER BY `Relevance` DESC LIMIT 0 , 30 Now, this query using ^ 20 seconds. How to optimize this? EXPLAIN gives this: 1 PRIMARY AA ALL NULL NULL NULL NULL 11169 Using temporary; Using filesort 1 PRIMARY ALL NULL NULL NULL NULL 681 Using where 1 PRIMARY IA ALL accepted NULL NULL NULL 11967 Using where 2 DERIVED xv_article fulltext topic topic 0 1 Using where; Using temporary; Using filesort This is example server with my data: user: bordeux_4prog password: 4prog phpmyadmin: http://phpmyadmin.bordeux.net/ chive: http://chive.bordeux.net/

    Read the article

  • what happens when I don't manage to call `recv` fast enough?

    - by amn
    Hi all, I want to account for a possible scenario where clients of my TCP/IP stream socket service send data to my service faster than it manages to move the data to its buffers (I am talking about application buffers, naturally) with recv and work with it. So basically, what happens in such scenarios? Obviously, some sort of service beneath my service which is a user application, has to receive incoming stream and store it somewhere until I issue 'recv', right? Most certainly the operating system. I don't want to re-open old questions, but I can't seem to find an answer to this seemingly obvious one?

    Read the article

  • Placing elements (panels) within a wx.GridBagSizer

    - by JHarris
    I'm using a gridbagsizer to place two panels within a frame. control_panel = wx.Panel(self, id=ID_CONTROL_PANEL) main_panel = wx.Panel(self, id=ID_MAIN_PANEL) frame_sizer = wx.GridBagSizer(1, 1) frame_sizer.Add(control_panel, (0, 0), (2, 5), flag=wx.EXPAND) frame_sizer.Add(main_panel, (2, 0), (5, 5), flag=wx.EXPAND) frame_sizer.AddGrowableRow(0) frame_sizer.AddGrowableCol(0) self.SetSizer(frame_sizer) I want the control_panel to be above the main_panel (as you can see above). However this is the output I get: I don't know why the top panel is so much larger than the bottom panel, when I've specified the opposite. (2, 5) for the top and (5, 5) for the bottom. It also has a strange behaviour when I resize it smaller, it basically gives me what I want (see image below), but I don't know how to maintain the ratio when I make it larger again. However when you start resizing larger (even by a small amount) you can see (below) the shapes and ratio change dramatically in the other direction (with the bottom becoming much smaller and the top much larger). Still trying to learn this sizers and can't really find this problem with any of the examples I've seen. Also tried experimenting with all the parameters and doing some tests and I can't figure out what's going on here. Any help would be much appreciated.

    Read the article

  • Good way to make changes to production database / source code

    - by This is it
    Hi I'm interested to find out what would be the good way to make changes to production database and source code in web application (ASP.NET, SQL Server 2008). A little bit more details, we develop on local machines, and then we need to transfer the code and database changes to production (pretty much standard story). At the moment we do it in the evening, change the database directly from management studio on production server, and then just overwrite the existing asp.net code (copy/past). Thanks

    Read the article

  • CanCan polymorphic resource access problem

    - by Call 'naive' True
    Hi everybody, i don't quite understand how to restrict access to links in this particular case with CanCan. I always get "Edit" link displayed. So i believe the problem is in my incorrect definition of cancan methods(load_ and authorize_). I have CommentsController like that: class CommentsController < ApplicationController before_filter :authenticate_user! load_resource :instance_name => :commentable authorize_resource :article def index @commentable = find_commentable #loading our generic object end ...... private def find_commentable params.each { |name, value| if name =~ /(.+)_id$/ return $1.classify.constantize.includes(:comments => :karma).find(value) end } end end and i have in comments/index.html.erb following code that render file from other controller: <%= render :file => "#{get_commentable_partial_name(@commentable)}/show.html.erb", :collection => @commentable %> you can think about "#{get_commentable_partial_name(@commentable)}" like just "articles" in this case. Content of "articles/show.html.erb": <% if can? :update, @commentable %> <%= link_to 'Edit', edit_article_path(@commentable) %> | <% end %> my ability.rb: class Ability include CanCan::Ability def initialize(user) user ||= User.new # guest user if user.role? :admin can :manage, :all elsif user.role? :author can :read, [Article, Comment, Profile] can :update, Article, :user_id => user.id end end end relations with models is: class Comment < ActiveRecord::Base belongs_to :commentable, :polymorphic => true, :dependent => :destroy ... end class Article < ActiveRecord::Base has_many :comments, :as => :commentable, :dependent => :destroy ... end i have tried debug this issue like that user = User.first article = Article.first ability = Ability.new(user) ability.can?(:update, article) and i always get "= true" in ability check Note: user.role == author and article.user_id != user.id if you need more information please write thank's for your time && sorry for my english

    Read the article

  • [jQuery] Change the content of a cell from another cell

    - by robs
    hey, i'm trying to select change the content of a cell with jquery but i cant seem to get it working. lets say we have this table: <table border="1"> <tr> <td>cell 1 <td>cell 2 <td>cell 3 <tr> <td>cell 4 <td>cell 5 <td>cell 6 <a onclick="javascript:$(this).parent().parent().('td').html('test');">Click</a> <tr> <td>cell 7 <td>cell 8 <td>cell 9 </table> i want to change the content of cell 4 from within cell 6. the ('td') obviously isnt working. how can i access cell 4 from cell 6 without the use of classes or ids? thanks in advance

    Read the article

  • CSS Clearing Floats

    - by Frank
    I'm making more of an effort to separate my html structure from presentation, but sometimes when I look at the complexity of the hacks or workarounds to make things work cross-browser, I'm amazed at huge collective waste of productive hours that are put into this. As I understand it, floats were never created for creating layouts, but because many layouts need a footer, that's how they're often being used. To clear the floats, you can add an empty div that clears both sides (div class="clear"). That is simple and works cross browser, but it adds "non-semantic" html rather than solving the presentation problem within the CSS. I realize this, but after looking at all of the solutions with their benefits and drawbacks, it seems to make more sense to go with the empty div (predictable behavior across browsers), rather than create separate stylesheets, including various css hacks and workarounds, etc. which would also need to change as CSS evolves. Is it o.k. to do this as long as you do understand what you're doing and why you're doing it? Or is it better to find the CSS workarounds, hacks and separate structure from presentation at all costs, even when the CSS presentation tools provided are not evolved to the point where they can handle such basic layout issues?

    Read the article

  • why does the gingerbread emulator orientation gets stuck in apps?

    - by tabjsina
    At first I thought this was a problem with my app, but it seems to be happening in any app (though interestingly, not the home screen) in the gingerbread emulator. To replicate my issue, open eclipse and fire up the android emulator for gingerbread (I'm using the "Google APIs - API Level 9" as my target) So the procedure to duplicate once the emulator loads is press LCtrl-F11 to shift orientation to landscape, then again to switch to portrait Result: In the homescreen: The view rotates to landscape, and then back to portrait, as expected In any app (i've tried browser, calculator, maps, and the app i'm currently working on): the view rotates to landscape, and then nothing, it stays in landscape even the emulator is displaying the phone in landscape mode (see below) http://i54.tinypic.com/2ake06v.jpg Has anyone else had this issue, or have I installed the emulator in some incorrect way - this hasn't been an issue with any of the previous emulators

    Read the article

  • PHP Guideline required

    - by user160820
    I am interested in learning PHP, but the books that I read are in procedural style and the source code that I try to reay are also mixtures of SQL,PHP and HTML. My Background is from Java. What I want to learn is PHP really with seprate Layers. Database Layer, Controller and View but I don't want to use any Framework. I also have fried some OOP PHP books, but they not what I am lloking for. What I need is a book or any Document that develops a sample website in pure PHP but in OOP style. Any Help. Thanks a lot in advance.

    Read the article

  • Modelling in Agile Development

    - by bertzzie
    I'm writing a bachelor dissertation report where I'm developing a system with Agile methodology. Given that the development is an one man show, of course the "Agile" I did was not really agile at all (from my understanding at least). So I want some perspective from SO crowds, who is of course a professional, real world, developer with tons of experience. I think real world experience is better than the theory and experiments that I did. My question is: Do we model during development time when using Agile? UML? DFD? Or a Functional Specification is enough1? If modelling is not really necessary, what do we use to communicate to the user, as the user almost always won't understand UML or DFD? For my system, I use UI & UX Design with heavy prototyping, but then I don't have time to draw UML any more. Which one is better? 1 http://www.joelonsoftware.com/articles/fog0000000036.html I hope the question's not "subjective and argumentative" as I know this question exist because of my lack of understanding in the agile development. If it is, could someone just give me a pointer or reference about that? Possible duplicate: Do you use UML in Agile development practices?

    Read the article

  • Web.Config is Cached

    - by SGWellens
    There was a question from a student over on the Asp.Net forums about improving site performance. The concern was that every time an app setting was read from the Web.Config file, the disk would be accessed. With many app settings and many users, it was believed performance would suffer. Their intent was to create a class to hold all the settings, instantiate it and fill it from the Web.Config file on startup. Then, all the settings would be in RAM. I knew this was not correct and didn't want to just say so without any corroboration, so I did some searching. Surprisingly, this is a common misconception. I found other code postings that cached the app settings from Web.Config. Many people even thanked the posters for the code. In a later post, the student said their text book recommended caching the Web.Config file. OK, here's the deal. The Web.Config file is already cached. You do not need to re-cache it. From this article http://msdn.microsoft.com/en-us/library/aa478432.aspx It is important to realize that the entire <appSettings> section is read, parsed, and cached the first time we retrieve a setting value. From that point forward, all requests for setting values come from an in-memory cache, so access is quite fast and doesn't incur any subsequent overhead for accessing the file or parsing the XML. The reason the misconception is prevalent may be because it's hard to search for Web.Config and cache without getting a lot of hits on how to setup caching in the Web.Config file. So here's a string for search engines to index on: "Is the Web.Config file Cached?" A follow up question was, are the connection strings cached? Yes. http://msdn.microsoft.com/en-us/library/ms178683.aspx At run time, ASP.NET uses the Web.Config files to hierarchically compute a unique collection of configuration settings for each incoming URL request. These settings are calculated only once and then cached on the server. And, as everyone should know, if you modify the Web.Config file, the web application will restart. I hope this helps people to NOT write code!   Steve WellensCodeProject

    Read the article

  • Can I use multiple email servers at once?

    - by TheLQ
    I was wondering: Can you use multiple email servers at once? In this case, I was going to add all the Google Apps MX records then add the MX records of another email server. My goal here is to only use the somewhat expensive Google Apps for only important email addresses (eg all the employees), then use the other cheap email server for other email addresses like webmaster and some other unimportant but needed emails. My thought is that a mail message would try the first 5 Google Apps mail servers, fail, then go to mine and succeed. Would this work? If not, are there any other options?

    Read the article

  • Strange ssh key issue

    - by user55714
    Scenario 1. I am doing this from /home/deploy directory I am trying to set up ssh with github for capistrano deployment. this has been an absolute nightmare. when I do ssh [email protected] as the deploy account I get Permission denied (publickey). so may be the key is not being found, so If I do a ssh-add /home/deploy/.ssh/id_rsa Could not open a connection to your authentication agent. (i did verify that the ssh-agent was running) If I do exec ssh-agent bash and then repeat the ssh-add then the key does get added and I can ssh into github. Now I exit from the ssh connection to my server and ssh back in and I can't ssh into github anymore! Scenario 2 if I login to my remote server and then cd into my .ssh directory and ssh into github then it all works fine I guess there is a problem with locating the key and for some reason the agent isn't funcitoning correctly. Any ideas? Her is a pastie with more details..my .bashrc, permissions etc. http://pastie.org/pastes/1190557/

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >