Search Results

Search found 9093 results on 364 pages for 'three cups'.

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

  • Best way to synchronise photos to three machines. Laptop, Desktop, NAS

    - by user9632
    I'm using Picasa as my photo management software, and I have a collection of photos that gets downloaded from my cameras either onto my Desktop or onto my Laptop. I'd like to automatically have copies of all my photos on both my laptop, desktop and my NAS. Does anyone else do this? Do you have any recommendations for Software or processes? Is there anything I need to be careful of? I had a look at Dropbox, but it appears to have a 2 gig limit? What about something like SyncBack?

    Read the article

  • How to hold three different text alignments in one CSS Box ?

    - by UXdesigner
    Good day, I've got a simple CSS question. I'm trying to change a table into a CSS box, but aligning the table content is difficult to me right now. Below there's an example of what's inside of the css box i created. How can I align these three elements (calendar and icon to the left , a text link to the center, and the other date field to the right ?) correctly ? I've tried several things but the problem is getting it aligned properly. I want to change everything in this application that has been created with tables, to css. And I've been an 80% succesful so far. I'd like to see some easy to understand code, to see how I can apply it on my code. Thank you for your kind help. I might be burned out due to stress. [Calendar (icon) Link Date]

    Read the article

  • How much more productive are three monitors than two?

    - by Sir Graystar
    I am mulling over whether to buy a new monitor, to go along side my current setup of two 24 (ish) inch monitors. What I want to know is whether this is worth the money (probably around £200)? I think most of us will agree that two monitors is much more productive than one when programming and developing (Jeff Atwood has said this many times on his blog, and I imagine that most of you are fans of his), but is three much more productive than two? What I'm worried about is that I will have so much space that one monitor will be used for things that are not related to the task (music, facebook etc.) and it will actually make me less productive.

    Read the article

  • How to get all n sets of three consecutives elements in an array or arraylist with a for statement ?

    - by newba
    Hi, I'm trying to do a convex hull approach and the little problem is that I need to get all sets of three consecutive vertices, like this: private void isConvexHull(Ponto[] points) { Arrays.sort(points); for (int i = 0; i <points.length; i++) { isClockWise(points[i],points[i+1],points[i+2]); } //... } I always do something that I don't consider clean code. Could please help me find one or more ways to this? I want it to be circular, i.e., if my fisrt point of the a set is the last element in the array, the 2nd element will be the 3rd in the list and the 3rd in that set will be the the 2nd element in the list, and so on. They must be consecutive, that's all.

    Read the article

  • Generate a commutative hash based on three sets of numbers?

    - by DarkAmgine
    I need to generate a commutative hash based on three sets of "score" structs. Each score has a "start", an "end" and a "number". Both start and end are usually huge numbers (8-9 digits) but number is just from 1 to 4. I need them to be commutative so the order does not matter. I'm using XOR at the moment but it seems to be giving bad results. Since I'm working with large large datasets, I'd prefer a performance-friendly solution. Any suggestions? Thanks =] public static int getCustomHash(cnvRegion c1, cnvRegion c2, cnvRegion c3) { int part1 = (c1.startLocation * c2.startLocation * c3.startLocation); int part2 = (c1.endLocation * c2.endLocation * c3.endLocation); int part3 = (c1.copyNumber + c2.copyNumber + c3.copyNumber)*23735160; return part1 ^ part2 ^ part3; }

    Read the article

  • JQuery identify current CSS background-image in three-state icon/button?

    - by T9b
    Hi I have three images being used to indicate an application icon state and I'm attempting to use css to do this. No problem with the original or hover states: #myDIV { background-image: url(icons/homeBlack.png); } #myDIV:hover { background-image: url(icons/homeWhite.png); } but I need to do two other things: 1) when the item is clicked it should use the third image $("#myDIV").click(function(event){ // change this button $(this).css("background-image", "url(icons/homeBlue.png)"); }); 2) if it is clicked again it should not apply the third image again because it's already applied - so it needs to check if it has been applied My questions are: 1) simply am I missing a css trick somewhere or is Jquery the best way to do this? 2) can I check which background-image is in place and how? I can't seem to find anything in JQuery that would allow me to determine which image is "currently" in place. Thanks in advance for any help.

    Read the article

  • query to return three records for each customer application based on the options declared in the pre

    - by kumarreddy
    tables look like this table1---customer application columns--- application id--primary key, name, ssn, ... ... table2----balance(actually its a view) columns--- amount balance, application id ...... ...... table3 ---- options columns--- optionid, option value(1,2,3,4), ...... ........ .... table4 ----- ratios columns--- ratios id, option value, ratio value, applicationid(have to think about it), ........ table 4(detail) option value, Ratios 1 ----- 30 1 ----- 40 1 ----- 30 2 ---- 100 2 ----- 0 2 ------ 0 3 ---- 60 3 ------ 30 3 ----- 10 4 ---- 50 4 ----- 30 4 ----- 20 as is the case...now i need to get three records for each customer application with varying balances in proportion of ratios declared in table 4 corresponding to option values...... plz let me know where i was unclear about returning records thanks in advance

    Read the article

  • Is it possible to compute the minimum of three numbers by using two comparisons at the same time?

    - by Milo Hou
    I've been trying to think up of some way that I could do two comparisons at the same time to find the greatest/least of three numbers. Arithmetic operations on them are considered "free" in this case. That is to say, the classical way of finding the greater of two, and then comparing it to the third number isn't valid in this case because one comparison depends on the result of the other. Is it possible to use two comparisons where this isn't the case? I was thinking maybe comparing the differences of the numbers somehow or their products or something, but came up with nothing. Just to reemphasize, two comparisons are still done, just that neither comparison relies on the result of the other comparison. EDIT: what about: boolA = A^2 + B^2 < C^2 boolB = A > B if boolA then max=C else if boolB then max=A else max=B

    Read the article

  • "Remember" last three MySql queries; Cookie, passed variable or other method?

    - by Camran
    I have a classified website, with pretty sophisticated searching, and I am about to implement a function where the last three queries is displayed for the user, so that the user can go back easier through the queries. This because for each query the user has to provide a lot of input. I have four questions for you: I wonder, how can I save the actual query (SELECT * FROM etc etc)...? Do I need to add some form of encryption to be on the safe side? How will this affect performance? (I don't like the fact that cookies slow websites down) Anything else to think about? If you need more input, let me know... Btw, the website is PHP based. Thanks

    Read the article

  • Three customer addresses in one table or in separate tables?

    - by DR
    In my application I have a Customer class and an Address class. The Customer class has three instances of the Address class: customerAddress, deliveryAddress, invoiceAddress. Whats the best way to reflect this structure in a database? The straightforward way would be a customer table and a separate address table. A more denormalized way would be just a customer table with columns for every address (Example for "street": customer_street, delivery_street, invoice_street) What are your experiences with that? Are there any advantages and disadvantages of these approaches?

    Read the article

  • Three Checkboxes, One must be selected to enable submit button, needs Jquery?

    - by Jamie
    I have between 1-three checkboxes and by default they are all disabled. In order for the submit button to be active ove checkbox minumum must be selected. Can someone help me with a jquery snippet to achieve this? My markup looks like this and the site used jquery 1.42. Please and thankyou! <form action="/cart/add" method="post" id="pform"> <h3 class="goudy">Make your selection:</h3> <ul id="variants"> <li> <input type="checkbox" name="id[]" value="39601622" id="radio_39601622" style="vertical-align: middle;" class="required" /> <label for="radio_39601622[]">$38.00 - Original Antique Photo</label> </li> <li> <input type="checkbox" name="id[]" value="39601632" id="radio_39601632" style="vertical-align: middle;" class="required" /> <label for="radio_39601632[]">$8.99 - SCAN</label> </li> <li> <input type="checkbox" name="id" value="39777962" id="radio_39777962" style="vertical-align: middle;" class="required" /> <label for="radio_39777962">$2.99 - Rigid Sleeve</label> </li> </ul> <div class="buttons clearfix"> <input type="image" src="../images/add-to-cart.png" name="add" value="Add to Cart" id="add" class="send-to-cart" /> </div> </form>

    Read the article

  • [C#] Three System.Drawing methods manifest slow drawing or flickery: Solutions? or Other Options?

    - by Luke Mcneice
    Hi all, I am doing a little graphing via the System.Drawing and im having a few problems. I'm holding data in a Queue and i'm drawing(graphing) out that data onto three picture boxes this method fills the picture box then scrolls the graph across. so not to draw on top of the previous drawings (and graduly looking messier) i found 2 solutions to draw the graph. Call plot.Clear(BACKGOUNDCOLOR) before the draw loop [block commented] although this causes a flicker to appear from the time it takes to do the actual drawing loop. call plot.DrawLine(channelPen[5], j, 140, j, 0); just before each drawline [commented] although this causes the drawing to start ok then slow down very quickly to a crawl as if a wait command had been placed before the draw command. Here is the Code for reference: /*plotx.Clear(BACKGOUNDCOLOR) ploty.Clear(BACKGOUNDCOLOR) plotz.Clear(BACKGOUNDCOLOR)*/ for (int j = 1; j < 599; j++) { if (j > RealTimeBuffer.Count - 1) break; QueueEntity past = RealTimeBuffer.ElementAt(j - 1); QueueEntity current = RealTimeBuffer.ElementAt(j); if (j == 1) { //plotx.DrawLine(channelPen[5], 0, 140, 0, 0); //ploty.DrawLine(channelPen[5], 0, 140, 0, 0); //plotz.DrawLine(channelPen[5], 0, 140, 0, 0); } //plotx.DrawLine(channelPen[5], j, 140, j, 0); plotx.DrawLine(channelPen[0], j - 1, (((past.accdata.X - 0x7FFF) / 256) + 64), j, (((current.accdata.X - 0x7FFF) / 256) + 64)); //ploty.DrawLine(channelPen[5], j, 140, j, 0); ploty.DrawLine(channelPen[1], j - 1, (((past.accdata.Y - 0x7FFF) / 256) + 64), j, (((current.accdata.Y - 0x7FFF) / 256) + 64)); //plotz.DrawLine(markerPen, j, 140, j, 0); plotz.DrawLine(channelPen[2], j - 1, (((past.accdata.Z - 0x7FFF) / 256) + 94), j, (((current.accdata.Z - 0x7FFF) / 256) + 94)); } Is there any tricks to avoid these overheads? If not would there be any other/better solutions?

    Read the article

  • How do I pass three arrays from on method to another?

    - by user2966716
    I have a method studentSummary, that scans the input and creates three arrays examMark,courseworkMark and courseworkWeight. I need these arrays passing over to a different method, so I can use them to calculate moduleResult. heres my code: public static int[] studentSummary(int[] courseworkWeight2, int [] examMark2 , int [] courseworkMark2){ int examMark[] = { 0, 0, 0, 0, 0, 0 }; int courseworkMark[] = { 0, 0, 0, 0, 0, 0 }; Scanner resultInput = new Scanner(System.in); int courseworkWeight[] = { 0, 0, 0, 0, 0, 0 }; for (int k = 1; k < 7; k++) { System.out.print("Please enter exam marks for module " + k + ":"); examMark[k - 1] = resultInput.nextInt(); System.out.print("Please enter Coursework marks for module " + k + ":"); courseworkMark[k - 1] = resultInput.nextInt(); System.out.print("Please enter Coursework weighting for module " + k + ":"); courseworkWeight[k - 1] = resultInput.nextInt(); } Calculator method: public static int[] markCalculator() { int[] courseworkWeight = new int [6]; int[] courseworkMark = new int [6]; int[] examMark = new int [6]; for (int i = 0; i < 6; i++) { computedModuleMark = ((courseworkMark[i] * courseworkWeight[i]) + (examMark[i] * (100 - courseworkWeight[i]))) / 100; if ((computedModuleMark) < 35) { if (examMark[i]<35){ } } moduleMark[i] = computedModuleMark; } computeResult(moduleMark); StudentChart.draw(moduleMark); StudentChart.printSummary(moduleMark); return moduleMark; }

    Read the article

  • How to make code-review feel less like a way to *shift* the responsibility? [duplicate]

    - by One Two Three
    This question already has an answer here: How do you make people accept code review? 33 answers Sometimes it seems to me that people ask for code-reviews just so they would be able to say "Xyz reviewed my code!"(1) when something broke. Question, is that ever the case? (Or is it just my imagination) If it is, how do I handle this? (1): What s/he really meant: It's Xyz's fault or something along those lines.

    Read the article

  • Fixing a spelling mistake in a method name

    - by One Two Three
    One of the methods that I commonly use in our codebase is misspelled (and it predated me). This really irritates me not simply because it is mispelled but more importantly it makes me ALWAYS get the method name wrong the first time I type it (and then I have to remember "Oh, right, it should be mispelled to this...") I'm making a few changes around the original method. Should I take the opportunity to just rename the freaking method?

    Read the article

  • fixing spelling mistake in method name

    - by One Two Three
    One of the methods that I commonly use in our codebase is misspelled (and it predated me). This really irritates me not simply because it is mispelled but more importantly it makes me ALWAYS get the method name wrong the first time I type it (and then I have to remember "Oh, right, it should be mispelled to this...") I'm making a few changes around the original method. Should I take the opportunity to just rename the freaking method?

    Read the article

  • backbone.js - Having multiple instances of the same view

    - by TrueWheel
    I am having problems having multiple instances in of the same view in different div elements. When I try to initialize them only the second of the two elements appear no matter what order I put them in. Here is the code for my view. var BodyShapeView = Backbone.View.extend({ thingiview: null, scene: null, renderer: null, model: null, mouseX: 0, mouseY: 0, events:{ 'click button#front' : 'front', 'click button#diag' : 'diag', 'click button#in' : 'zoomIn', 'click button#out' : 'zoomOut', 'click button#on' : 'rotateOn', 'click button#off' : 'rotateOff', 'click button#wireframeOn' : 'wireOn', 'click button#wireframeOff' : 'wireOff', 'click button#distance' : 'dijkstra' }, initialize: function(name){ _.bindAll(this, 'render', 'animate'); scene = new THREE.Scene(); camera = new THREE.PerspectiveCamera( 15, 400 / 700, 1, 4000 ); camera.position.z = 3; scene.add( camera ); camera.position.y = -5; var ambient = new THREE.AmbientLight( 0x202020 ); scene.add( ambient ); var directionalLight = new THREE.DirectionalLight( 0xffffff, 0.75 ); directionalLight.position.set( 0, 0, 1 ); scene.add( directionalLight ); var pointLight = new THREE.PointLight( 0xffffff, 5, 29 ); pointLight.position.set( 0, -25, 10 ); scene.add( pointLight ); var loader = new THREE.OBJLoader(); loader.load( "img/originalMeanModel.obj", function ( object ) { object.children[0].geometry.computeFaceNormals(); var geometry = object.children[0].geometry; console.log(geometry); THREE.GeometryUtils.center(geometry); geometry.dynamic = true; var material = new THREE.MeshLambertMaterial({color: 0xffffff, shading: THREE.FlatShading, vertexColors: THREE.VertexColors }); mesh = new THREE.Mesh(geometry, material); model = mesh; // model = object; scene.add( model ); } ); // RENDERER renderer = new THREE.WebGLRenderer(); renderer.setSize( 400, 700 ); $(this.el).find('.obj').append( renderer.domElement ); this.animate(); }, Here is how I create the instances var morphableBody = new BodyShapeView({ el: $("#morphable-body") }); var bodyShapeView = new BodyShapeView({ el: $("#mean-body") }); Any help would be really appreciated. Thanks in advance.

    Read the article

  • Virtual Pageview Goal Funnel Not Tracking Correctly

    - by cphill
    I have an AJAX form that has three stages: 1. The landing page where a user fills out a form and selects between three question sets and clicks begin assessment 2. The assessment page, where users fill out questions relating to the question set that they selected on the landing page. 3.The results page, which shows whether they are at High Risk or Low Risk. Since this is an AJAX form that does not open a new page for each step of the process, I implemented a virtual pageview that would fire on the pageload of each step of the form process. The following is my virtual pageview setup for each stage: /form/begin-assessment /form/assessment/* (* = Three different virtual pageviews depending on the users selection of the three sets of questions: /one, /two, /three) 3./form/finished-assessment I have set up three separate goals to track user progress through each step of the form assessment. Here is my Goal setup: Goal Description: -Goal Type: Destination Goal Details: -Destination: /form/finished-assessment -Funnel: On Step 1: /form/begin-assessment (Required: Yes) Step 2: /form/assessment/one (Step 2: replace /one with /two or /three and you have my two other goals setup) Now my goals are recording the correct data in the first step and show the completions in the destination, but the second step does not show any drop offs. They show the same data as the destination. Any ideas of how I set up the goals wrong?

    Read the article

  • Is there a way to change the root password while still logged in? I did something bad by accdient -_-

    - by Robert
    So I was trying to add my printer, and I wasn't able to make any changes due to the fact that cups was not accepting my root password. I was Googling some changes and trying to fix the problem when one of the commands CHANGED MY SUDO PASSWORD! Can someone please tell me which one of these is the culprit? I was trying to these commands: cat /etc/group | grep root cat /etc/group | grep myUserName usermod -a -G lpadmin myUserName sudo usermod -a -G lpadmin myUserName sudo gedit /etc/cups/cupsd.conf lppasswd -a myUserName lppasswd -a root sudo lppasswd -a myUserName I think it was this one, but I know which passwords I put in! There was nothing which I typed in besides my strong password or my easy temporary password. Unless I made a typo... please no. restart cups sudo password root This is so not cool, I was just trying to add a printer :'( Please help my stupidity!

    Read the article

  • Three ways of ataching to events with dojo. What exactly is the difference?

    - by Mark
    Is the difference here just various syntactical sugars or is there a reason to use one approach over the other? They all work, and to be a little more confusing what is the difference between this and evt.currentTarget? the CSS #reportDetails table tr:hover td, #reportDetails table tr.hover td { background: #aae4e2; color: #333333; } Sample html <div id="reportDetails"> <table> <tr> <td> something</td> <td> soemthing else</td> </tr> <tr> <td> something2</td> <td> soemthing else2</td> </tr> </table> </div> dojo.behavior script dojo.require("dojo.behavior"); if (dojo.isIE <= 6) { dojo.behavior.add({ '#reportDetails tr': { onmouseover: function(evt){ dojo.addClass(evt.currentTarget, "hover");}, onmouseout: function(evt){dojo.removeClass(evt.currentTarget, "hover"); } } }); } dojo.behavior.apply(); dojo.query forEach script if (dojo.isIE <= 6) { dojo.addOnLoad(function() { dojo.query("tr", "reportDetails").forEach(function(node){ node.onmouseover=function(){dojo.addClass(node,"hover");} node.onmouseout=function() {dojo.removeClass(node,"hover");} } }); }); } dojo.query ataching straight to the events if (dojo.isIE <= 6) { dojo.addOnLoad(function(){ dojo.query("tr", "reportDetails") .onmouseover(function(evt){dojo.addClass(evt.currentTarget, "hover");}) .onmouseout(function(evt){dojo.removeClass(evt.currentTarget, "hover");}); }); } I am assuming that evt.currentTarget and node could all be replaced with this and still work. I believe there is no real difference between 2 and 3 but the first one might actually use a different approach.

    Read the article

  • How do I sort a multidimensional hash array by a key maybe three levels in, in PHP?

    - by Chris Denman
    I am moving from Perl to PHP and am struggling to get my head around PHP sorting. Here's what I have in Perl: $log{12345}{0}{20100102}{name}='blah'; $log{54312}{1}{20100101}{name}='blah'; $log{14323}{3}{20100103}{name}='blah'; foreach $entry (sort {$log{$cook}{$a}{time} cmp $log{$cook}{$b}{time}} keys %{$log{$cook}}){ ... } Basically, I would have the same array structure in PHP but want to sort like I do above.

    Read the article

  • mysql prevent displaying a row ONE which has reference in another row TWO but no reference in row THREE

    - by Jayapal Chandran
    I have a table like the following id | name | pid 1 | sam | NULL 2 | sams ref | 1 3 | pam | NULL For the first time the first row gets inserted which will have pid as null I insert a row which is related to the first row and then i insert a row which is new and which may be referred by another row in future. now i want only the third row to be displayed and not the first and second row as the second row contains the reference of first row. so if any row has a reference to another row then both the rows should not be displayed. Only rows which is not having any reference should be displayed. BESIDES, IS IT A GOOD PRACTICE? PLEASE ADVICE ON THIS. Edited When i updated in server the query is always giving empty result. here is what i have and this one When pid is NULL then that row should appear but when another entry in the same table with pid as its parent id or any other rows id appears then both the rows should not appear. so if any pid has been referred then both the rows should not appear. here only one row will refer another row and not more than that. in my localhost i have mysql version 5.0.1 or something like that but when i installed xampp in another system it had 5.5 and in the live server it was 5.3 so in version around 5.0 the query is returning rows but in higher versions it is returning empty rows. so now i this case how to make a query?

    Read the article

  • three out of five file streams wont open, i believe its a problem with my ifstreams.

    - by user320950
    #include<iostream> #include<fstream> #include<cstdlib> #include<iomanip> using namespace std; int main() { ifstream in_stream; // reads itemlist.txt ofstream out_stream1; // writes in items.txt ifstream in_stream2; // reads pricelist.txt ofstream out_stream3;// writes in plist.txt ifstream in_stream4;// read recipt.txt ofstream out_stream5;// write display.txt int wrong=0; in_stream.open("ITEMLIST.txt", ios::in); // list of avaliable items if( in_stream.fail() )// check to see if itemlist.txt is open { wrong++; cout << " the error occured here0, you have " << wrong++ << " errors" << endl; cout << "Error opening the file\n" << endl; exit(1); } else{ cout << " System ran correctly " << endl; out_stream1.open("ITEMLIST.txt", ios::out); // list of avaliable items if(out_stream1.fail() )// check to see if itemlist.txt is open { wrong++; cout << " the error occured here1, you have " << wrong++ << " errors" << endl; cout << "Error opening the file\n"; exit(1); } else{ cout << " System ran correctly " << endl; } in_stream2.open("PRICELIST.txt", ios::in); if( in_stream2.fail() ) { wrong++; cout << " the error occured here2, you have " << wrong++ << " errors" << endl; cout << "Error opening the file\n"; exit (1); } else{ cout << " System ran correctly " << endl; } out_stream3.open("PRICELIST.txt", ios::out); if(out_stream3.fail() ) { wrong++; cout << " the error occured here3, you have " << wrong++ << " errors" << endl; cout << "Error opening the file\n"; exit (1); } else{ cout << " System ran correctly " << endl; } in_stream4.open("display.txt", ios::in); if( in_stream4.fail() ) { wrong++; cout << " the error occured here4, you have " << wrong++ << " errors" << endl; cout << "Error opening the file\n"; exit (1); } else{ cout << " System ran correctly " << endl; } out_stream5.open("display.txt", ios::out); if( out_stream5.fail() ) { wrong++; cout << " the error occured here5, you have " << wrong++ << " errors" << endl; cout << "Error opening the file\n"; exit (1); } else{ cout << " System ran correctly " << endl; }

    Read the article

  • How can the Three-Phase Commit Protocol (3PC) guarantee atomicity?

    - by AndiDog
    I'm currently exploring worst case scenarios of atomic commit protocols like 2PC and 3PC and am stuck at the point that I can't find out why 3PC can guarantee atomicity. That is, how does it guarantee that if cohort A commits, cohort B also commits? Here's the simplified 3PC from the Wikipedia article: Now let's assume the following case: Two cohorts participate in the transaction (A and B) Both do their work, then vote for commit Coordinator now sends precommit messages... A receives the precommit message, acknowledges, and then goes offline for a long time B doesn't receive the precommit message (whatever the reason might be) and is thus still in "uncertain" state The results: Coordinator aborts the transaction because not all precommit messages were sent and acknowledged successfully A, who is in precommit state, is still offline, thus times out and commits B aborts in any case: He either stays offline and times out (causes abort) or comes online and receives the abort command from the coordinator And there you have it: One cohort committed, another aborted. The transaction is screwed. So what am I missing here? In my understanding, if the automatic commit on timeout (in precommit state) was replaced by infinitely waiting for a coordinator command, that case should work fine.

    Read the article

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