Search Results

Search found 2417 results on 97 pages for 'states'.

Page 13/97 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • UIButton and UIControlEventState issue

    - by Typeoneerror
    I'm having a very specific "bug" in my iPhone application. I'm setting two images for the highlighted and normal states of a button. It works as expected when you "press" and then "touch up" at a slow pace, but if you click/tap it quickly, there's a noticeable flicker between states. Is this a known bug or am I setting the states incorrectly? Here's the code that creates the buttons: UIImage *normalImage = [[UIImage imageNamed:@"btn-small.png"] stretchableImageWithLeftCapWidth:10.0f topCapHeight:0.0f]; UIImage *highlightedImage = [[UIImage imageNamed:@"btn-small-down.png"] stretchableImageWithLeftCapWidth:10.0f topCapHeight:0.0f]; [self setBackgroundColor:[UIColor clearColor]]; [self setBackgroundImage:normalImage forState:UIControlStateNormal]; [self setBackgroundImage:highlightedImage forState:UIControlStateDisabled]; [self setBackgroundImage:highlightedImage forState:UIControlStateHighlighted]; [self setAdjustsImageWhenDisabled:FALSE]; [self setAdjustsImageWhenHighlighted:FALSE]; When a button is tapped it simply disables itself and enables the other button: - (IBAction)aboutButtonTouched:(id)sender { aboutButton.enabled = FALSE; rulesButton.enabled = TRUE; } - (IBAction)rulesButtonTouched:(id)sender { rulesButton.enabled = FALSE; aboutButton.enabled = TRUE; } Any thoughts on this quick-click flicker?

    Read the article

  • Is there a good digraph layout library callable from C++?

    - by Steve314
    The digraphs represent finite automata. Up until now my test program has been writing out dot files for testing. This is pretty good both for regression testing (keep the verified output files in subversion, ask it if there has been a change) and for visualisation. However, there are some problems... Basically, I want something callable from C++ and which plans a layout for my states and transitions but leaves the drawing to me - something that will allow me to draw things however I want and draw on GUI (wxWidgets) windows. I also want a license which will allow commercial use - I don't need that at present, and I may very well release as open source, but I don't want to limit my options ATM. The problems with GraphViz are (1) the warnings about building from source on Windows, (2) all the unnecessary dependencies for rendering and parsing, and (3) the (presumed) lack of a documented API specifically and purely for layout. Basically, I want to be able to specify my states (with bounding rectangle sizes) and transitions, and read out positions for the states and waypoints for each transition, then draw based on those co-ordinates myself. I haven't really figured out how annotations on transitions should be handled, but there should be some kind of provision for specifying bounding-box-sizes for those, associating them with transitions, and reading out positions. Does anyone know of a library that can handle those requirements? I'm not necessarily against implementing something for myself, but in this case I'd rather avoid it if possible.

    Read the article

  • angular bootstrap typeahead bug

    - by Mohammad Akbari
    i use angular bootstrap typeahead (this lib ui-bootstrap-tpls.js ) in my app, when use two typeahead in one scope, only one work well, and other not work, this is my code angular.module('plunker', ['ui.bootstrap']); function TypeaheadCtrl($scope) { $scope.selected = undefined; $scope.selected2 = undefined; $scope.states = ['Alabama', 'Alaska','California', 'Hawaii', 'Wisconsin', 'Wyoming']; } <html ng-app="plunker"> <head> <title></title> <link href="lib/angular-bootstrap/bootstrap.css" rel="stylesheet" /> <script src="lib/angular/angular.js"></script> <script src="lib/angular-bootstrap/ui-bootstrap-tpls-0.3.0.min.js"></script> <script src="app.js"></script> </head> <body> <div class='container-fluid' ng-controller="TypeaheadCtrl"> <pre>Model: {{selected| json}}</pre> <input type="text" ng-model="selected" typeahead="state for state in states | filter:$viewValue"> <input type="text" ng-model="selected2" typeahead="state for state in states | filter:$viewValue"> </div> </body> please check this and help.

    Read the article

  • Multiple Foreign keys to a single table and single key pointing to more than one table

    - by user1216775
    I need some suggestions from the database design experts here. I have around six foreign keys into a single table (defect) which all point to primary key in user table. It is like: defect (.....,assigned_to,created_by,updated_by,closed_by...) If I want to get information about the defect I can make six joins. Do we have any better way to do it? Another one is I have a states table which can store one of the user-defined set of values. I have defect table and task table and I want both of these tables to share the common state table (New, In Progress etc.). So I created: task (.....,state_id,type_id,.....) defect(.....,state_id,type_id,...) state(state_id,state_name,...) importance(imp_id,imp_name,...) There are many such common attributes along with state like importance(normal, urgent etc), priority etc. And for all of them I want to use same table. I am keeping one flag in each of the tables to differentiate task and defect. What is the best solution in such a case? If somebody is using this application in health domain, they would like to assign different types, states, importances for their defect or tasks. Moreover when a user selects any project I want to display all the types,states etc under configuration parameters section.

    Read the article

  • QLearning and never-ending episodes

    - by devoured elysium
    Let's imagine we have an (x,y) plane where a robot can move. Now we define the middle of our world as the goal state, which means that we are going to give a reward of 100 to our robot once it reaches that state. Now, let's say that there are 4 states(which I will call A,B,C,D) that can lead to the goal state. The first time we are in A and go to the goal state, we will update our QValues table as following: Q(state = A, action = going to goal state) = 100 + 0 One of 2 things can happen. I can end the episode here, and start a different one where the robot has to find again the goal state, or I can continue exploring the world even after I found the goal state. If I try to do this, I see a problem though. If I am in the goal state and go back to state A, it's Qvalue will be the following: Q(state = goalState, action = going to A) = 0 + gamma * 100 Now, if I try to go again to the goal state from A: Q(state = A, action = going to goal state) = 100 + gamma * (gamma * 100) Which means that if I keep doing this, as 0 <= gamma <= 0, both qValues are going to rise forever. Is this the expected behavior of QLearning? Am I doing something wrong? If this is the expected behavior, can't this lead to problems? I know that probabilistically, all the 4 states(A,B,C and D), will grow at the same rate, but even so it kinda bugs me having them growing forever. The ideia of allowing the agent to continue exploring even after finding the goal has to do with that the nearer he is from the goal state, the more likely it is to being in states that can be updated at the moment.

    Read the article

  • Will this RAID5 setup work (3TB Seagate Barracudas + Adaptec RAID 6405)?

    - by Slayer537
    As the title states, will this RAID combo work, and if not what needs to be changed? Overall opinions would be most helpful. I currently run a small file server of about 5TB or so. I keep outgrowing my needs and need to build a RAID setup that will allow me to expand as needed. I am new to RAID setups, especially one of the scale I have currently planned out, but I have being doing some research for the past couple of weeks and have come up with a build. Ideally, I'd have the setup completely built, but I'd like to keep the total cost around $1k and can't afford to go above $1.5k, so unfortunately that's not an option. 2 of my current drives are WD Caviar Blacks 2TB; however, I have recently learned that due to the lack of TLER those drives are awful for any RAID setup other than 0 or 1. That being said, my third drive is a Seagate Barracuda 3TB (ST300DM001) and I have found a RAID controller that states it supports it, so I'd like to use this same type of drive, if possible. Have any of you had any experience using this drive or a similar one in a RAID5 configuration? The manufacturer states that it supports it, but knowing that it is not an enterprise drive, I am slightly concerned that it could drop out of the array. I would just go with enterprise drives, but those are about double in cost... Parts list: Storage rack: http://www.ebay.com/itm/SGI-3U-Media-Storage-Server-16-Hard-Drive-Bay-SATA-SAS-Expander-Omnistor-SE3016-/140735776937?pt=LH_DefaultDomain_0&hash=item20c48188a9 3 more HDs (for now..): http://www.amazon.com/Seagate-Barracuda-3-5-Inch-Internal-ST3000DM001/dp/B005T3GRLY/ref=dp_return_2?ie=UTF8&n=172282&s=electronics Adaptec RAID 6405: http://www.newegg.com/Product/Product.aspx?Item=N82E16816103224 here's a link to the compatibility sheet if that helps: http://download.adaptec.com/pdfs/compatibility_report/arc-sas_cr_03-27-12_series6.pdf SAS expander cable: http://www.pc-pitstop.com/sas_cables_adapters/8887-2M.asp My plan is to install the RAID card in my computer and then route the SAS cable to the rack. Setup a RAID5 on 3 drives, transfer my data over from my other drive, and then add that drive to the array. Eventually, I'd like to get a 2U unit and run the file server on that and move the RAID card over to there, but that will have to happen later on. Side note: The computer the card would be going into will be running Windows 7 Pro with 24GB of DDR3-1600 and an i7-930.

    Read the article

  • Linux: close a program with command line (not kill it)

    - by CodeNoob
    Some applications only allow one running instance (like eclipse, if you want to use the same workspace). So if I log in from another location, I have to kill/close the application that was open when I previously logged in from another location. I always use kill command to kill the running process. But, if you kill a process, it might not save some states that are useful for future usage. However, if you "close" it properly byclicking on the close button, for example, it will save the states properly. Is there a way to properly "close" an application from command line? I know this can vary from applications, so let's be a bit more generic: how to send a signal to another running application, and this signal works just as if we click the "close" button in the top bar? thanks!

    Read the article

  • Varnish 3.0.2 to Apache2 sometimes return error 503

    - by Ronnie Jespersen
    Hey guys I hope you can help me out here. I have an Ngingx parsing http and https to a varnish cache(3.0.2). From the varnish it is sent to apache2. Now I have for some time been tracking some strange 503 errors. But I cant seem to find the silver bullet. Currently I am logging the 503 errors through varnish this way: sudo varnishlog -c -m TxStatus:503 >> /home/rj/varnishlog503.log and then referring to the apache access log to see if any 503 requests have been handled. Today I had a health check from the firewall that failed: 20 SessionOpen c 127.0.0.1 34319 :8081 20 ReqStart c 127.0.0.1 34319 607335635 20 RxRequest c HEAD 20 RxURL c /health-check 20 RxProtocol c HTTP/1.0 20 RxHeader c X-Real-IP: 192.168.3.254 20 RxHeader c Host: 192.168.3.189 20 RxHeader c X-Forwarded-For: 192.168.3.254 20 RxHeader c Connection: close 20 RxHeader c User-Agent: Astaro Service Monitor 0.9 20 RxHeader c Accept: */* 20 VCL_call c recv lookup 20 VCL_call c hash 20 Hash c /health-check 20 VCL_return c hash 20 VCL_call c miss fetch 20 Backend c 33 aurum aurum 20 FetchError c http first read error: -1 11 (No error recorded) 20 VCL_call c error deliver 20 VCL_call c deliver deliver 20 TxProtocol c HTTP/1.1 20 TxStatus c 503 20 TxResponse c Service Unavailable 20 TxHeader c Server: Varnish 20 TxHeader c Content-Type: text/html; charset=utf-8 20 TxHeader c Retry-After: 5 20 TxHeader c Content-Length: 879 20 TxHeader c Accept-Ranges: bytes 20 TxHeader c Date: Wed, 06 Jun 2012 12:35:12 GMT 20 TxHeader c X-Varnish: 607335635 20 TxHeader c Age: 60 20 TxHeader c Via: 1.1 varnish 20 TxHeader c Connection: close 20 Length c 879 20 ReqEnd c 607335635 1338986052.649786949 1338986112.648169994 0.000160217 59.997980356 0.000402689 Now the backend server (apache) does not have any 503 error in the access log at this point. So I am confused. Is this varnish throwing a 503 because it thinks apache is to slow? There is a lot traffic coming through at this point so I know the server is up and running. I do have other 503 error codes with posts and gets so there is really no pattern. It seems to be at random times and random requests. Even in the morning when the server dosen't seem to be doing anything. I do see another pattern in the log: 4 VCL_call c recv pass 4 VCL_call c hash 4 Hash c /?id=412 4 VCL_return c hash 4 VCL_call c pass pass 4 FetchError c no backend connection 4 VCL_call c error deliver 4 VCL_call c deliver deliver Here fetcherror says "no backend connection". A summery of the FetchErrors in todays log: 16 FetchError c http first read error: -1 11 (No error recorded) 5 FetchError c http first read error: -1 11 (No error recorded) 4 FetchError c http first read error: -1 11 (No error recorded) 19 FetchError c http first read error: -1 11 (No error recorded) 5 FetchError c http first read error: -1 11 (No error recorded) 23 FetchError c http first read error: -1 11 (No error recorded) 24 FetchError c http first read error: -1 11 (No error recorded) 16 FetchError c http first read error: -1 11 (No error recorded) 6 FetchError c http first read error: -1 11 (No error recorded) 4 FetchError c http first read error: -1 11 (No error recorded) 5 FetchError c http first read error: -1 11 (No error recorded) 4 FetchError c http first read error: -1 11 (No error recorded) 4 FetchError c http first read error: -1 11 (No error recorded) 22 FetchError c http first read error: -1 11 (No error recorded) 6 FetchError c http first read error: -1 11 (No error recorded) 21 FetchError c http first read error: -1 11 (No error recorded) 26 FetchError c no backend connection 4 FetchError c no backend connection 20 FetchError c http first read error: -1 11 (No error recorded) 39 FetchError c http first read error: -1 11 (No error recorded) I haven't changed the default timeout values for varnish. This is my configuration for one of the backend servers. backend xenon { .host = "192.168.3.187"; .port = "80"; .probe = { .url = "/health-check/"; .interval = 3s; .window = 5; .threshold = 2; } } I'm running prefork module on apache2 with this configuration <IfModule mpm_prefork_module> StartServers 1 MinSpareServers 2 MaxSpareServers 5 MaxClients 200 MaxRequestsPerChild 75 </IfModule> and only PHP files is sent to the server. Every other static file is handled by Nginx. Any ideas? ------- EDIT -------------- Some more debuging information I have run a varnishadm debug.health Backend radon is Healthy Current states good: 5 threshold: 2 window: 5 Average responsetime of good probes: 0.002560 Oldest Newest ================================================================ 4444444444444444444444444444444444444444444444444444444444444444 Good IPv4 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Good Xmit RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR Good Recv HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH Happy Backend xenon is Healthy Current states good: 5 threshold: 2 window: 5 Average responsetime of good probes: 0.002760 Oldest Newest ================================================================ 4444444444444444444444444444444444444444444444444444444444444444 Good IPv4 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Good Xmit RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR Good Recv HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH Happy Backend iridium is Healthy Current states good: 5 threshold: 2 window: 5 Average responsetime of good probes: 0.000849 Oldest Newest ================================================================ 4444444444444444444444444444444444444444444444444444444444444444 Good IPv4 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Good Xmit RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR Good Recv HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH Happy Backend aurum is Healthy Current states good: 5 threshold: 2 window: 5 Average responsetime of good probes: 0.002100 Oldest Newest ================================================================ 4444444444444444444444444444444444444444444444444444444444444444 Good IPv4 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Good Xmit RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR Good Recv HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH Happy And I have been monitoring varnishstat from the two load balancers 3224774 3.99 2.61 backend_conn - Backend conn. success 27 0.00 0.00 backend_unhealthy - Backend conn. not attempted 63 0.00 0.00 backend_fail - Backend conn. failures 358798 0.00 0.29 backend_reuse - Backend conn. reuses 21035 0.00 0.02 backend_toolate - Backend conn. was closed 379834 0.00 0.31 backend_recycle - Backend conn. recycles 26 0.00 0.00 backend_retry - Backend conn. retry 3217751 5.99 2.61 backend_conn - Backend conn. success 32 0.00 0.00 backend_fail - Backend conn. failures 364185 0.00 0.30 backend_reuse - Backend conn. reuses 27077 0.00 0.02 backend_toolate - Backend conn. was closed 391263 0.00 0.32 backend_recycle - Backend conn. recycles 36 0.00 0.00 backend_retry - Backend conn. retry Notice that none of them have reported backend_fail. /Ronnie

    Read the article

  • Will this car adapter power this Laptop?

    - by CT
    I'm looking to buy a number of car power adapters to be used with some Dell laptops. http://www.cdw.com/shop/products/default.aspx?EDC=1382005 ^ This is the item I am currently looking at. Will it be able to power a Dell Lattitude E6500? Looking at the power supply of the laptop, it states that it is a 90W-AC Adapter. The car adapter states that it is a 60W DC - AC Power Inverter. Will this work? Do I need an DC-AC Power Inverter that is 90W or higher? I am nothing close to an electrician, please help me out. Thank you.

    Read the article

  • How to quickly switch monitors on multi-monitor setup?

    - by Saxtus
    At my desktop PC, I have 3 displays hooked up on my Palit GeForce GTX 480 to extend my desktop: DVI: Samsung SyncMaster T220 (22" 16:10, 1680x1050, as my main) DVI: Samsung SyncMaster 940BF (19" 4:3, 1280x1024) HDMI: Sony Bravia KDL-32D3000 (32" 16:9, 1360x768) As expected, the GFX card can only utilize 2 of the displays at any given time, so I have to manually switch using Windows' "Display Properties" dialog, each time I want to switch between them. I've tried UltraMon, DisplayFusion and PowerStrip (so please don't refer me to a question where those are given as solutions) but they are unable to switch monitors. Instead they can only change display resolutions and settings on the existing active monitors, with specially weird results when I've saved the monitor states and then tried to switch monitors using the saved states! Any idea on how to bypass the awful "Display Properties" dialog and it's "confirm your change" timer?

    Read the article

  • How to quickly switch monitors on multi-monitor setup? (W7)

    - by Saxtus
    At my desktop PC, I have 3 displays hooked up on my Palit GeForce GTX 480 to extend my desktop: DVI: Samsung SyncMaster T220 (22" 16:10, 1680x1050, as my main) DVI: Samsung SyncMaster 940BF (19" 4:3, 1280x1024) HDMI: Sony Bravia KDL-32D3000 (32" 16:9, 1360x768) As expected, the GFX card can only utilize 2 of the displays at any given time, so I have to manually switch using Windows' "Display Properties" dialog, each time I want to switch between them. I've tried UltraMon, DisplayFusion and PowerStrip (so please don't refer me to a question where those are given as solutions) but they are unable to switch monitors. Instead they can only change display resolutions and settings on the existing active monitors, with specially weird results when I've saved the monitor states and then tried to switch monitors using the saved states! Any idea on how to bypass the awful "Display Properties" dialog and it's "confirm your change" timer? Thanks in advance.

    Read the article

  • QR vcard with a photo

    - by Cayetano Gonçalves
    I am about to get a ton of business cards printed from my new corporation, and I am allowed to have a QR code on it, and I would really like to be able to add a photo to be attached to the vcard. I know in the raw vcard you can add a photo like this: BEGIN:VCARD VERSION:4.0 N:Gump;Forrest;;; FN: Forrest Gump ORG:Bubba Gump Shrimp Co. TITLE:Shrimp Man PHOTO:http://www.example.com/dir_photos/my_photo.gif TEL;TYPE=work,voice;VALUE=uri:tel:+1-111-555-1212 TEL;TYPE=home,voice;VALUE=uri:tel:+1-404-555-1212 ADR;TYPE=work;LABEL="42 Plantation St.\nBaytown, LA 30314\nUnited States of America" :;;42 Plantation St.;Baytown;LA;30314;United States of America EMAIL:[email protected] REV:20080424T195243Z END:VCARD But I can't find any way to include the photo field into a QR code, any suggestions would be greatly appreciated.

    Read the article

  • Filemaker Server Not Installing and Windows Problems

    - by Shelly
    When I tried installing Filemaker Server 8.0 on Windows 2003 Server Standard Edition R2, an error message pop up that states: MMC has detected an error in a snap-in. It is recommended that you shut down and restart MMC. After this message pops up, Filemaker Server freezes. I'm also having problems with openssl and running executable files, but am not sure if the 2 are related. Error message for openssl states: Openssl.exe encountered a problem and needed to close. In one of the computers connected to the network running this same Server 2003 R2, when I tried double-clicking on Dr. Web antivirus to do a scan, nothing happens. I have done this many times before reinstalling the server, and it never gave trouble before this. Any help given is appreciated.

    Read the article

  • Can a power loss break an hard disk?

    - by dag729
    Today I was working when all of a sudden a power loss (in the entire house) occurs. I tried to reboot the machine but it states that there's an "Ebios error"; tried with an Ubuntu 9.04 live cd and while booting it states that there are various I/O errors on the first partition (the one with the boot sector). Now I managed to backup all of my data (using the live cd aforementioned) but I don't know if it'll worth the hassle of a reinstallation (and if it could do something useful) or if the only thing to do is to drop the hard disk as far as possible... Thanks in advance.

    Read the article

  • Windows Software to Save Arbitrary Application State

    - by ashes999
    VM software does a great job of saving state when you "turn it off," allowing instant and immediate return to that previous state. Is there some application for Windows that allows me to do the same thing, for any arbitrary software? It would allow me to save/restore state, possibly via a shell command or button that it appends to every window. Edit: For clarity, there are two types of apps: those that save their own states, and those that save others' states. Those that save their own state are like Chrome, which on load, reloads the windows you had open last time. That's not what I'm asking about; I'm asking for an app that can save the state of other apps, kind of like VM software does; but for any app. (A trivial test would be load notepad++, type a bunch of stuff, and save-state; on reset-state, you should be able to multi-level undo a lot of what you wrote, as if you never shut down the application.)

    Read the article

  • Windows Software to Save Arbitrary Application State

    - by ashes999
    VM software does a great job of saving state when you "turn it off," allowing instant and immediate return to that previous state. Is there some application for Windows that allows me to do the same thing, for any arbitrary software? It would allow me to save/restore state, possibly via a shell command or button that it appends to every window. Edit: For clarity, there are two types of apps: those that save their own states, and those that save others' states. Those that save their own state are like Chrome, which on load, reloads the windows you had open last time. That's not what I'm asking about; I'm asking for an app that can save the state of other apps, kind of like VM software does; but for any app. (A trivial test would be load notepad++, type a bunch of stuff, and save-state; on reset-state, you should be able to multi-level undo a lot of what you wrote, as if you never shut down the application.)

    Read the article

  • Windows 7 Shortdate Format Ignored

    - by Element
    I am moving a copy of an ASP.net web application running on a windows server 2003 box to a Windows 7 Laptop. On the win server 2003 box the locale was set to United States and shortdate format was M/DD/YYYY. On the Windows 7 machine it is DD/MM/YYYY which is breaking the application. I have tried changing all the locale settings under controlpanel-regions to United States and rebooting with no luck. I also tried explcitly setting the shortdate format to M/DD/YYYY under the region settings but the web application seems to ignore it. How can I change the Windows 7 shortdate format so an ASP.net application will recognize it ?

    Read the article

  • Java File I/O problems

    - by dwwilson66
    This is my first time working with file i/o in java, and it's not working. The section of the program where I parse individual lines and output a semicolon delimited line works like a charm when I hardcode a file and display on screen. Whne I try to write to a file public static OutputStream... errors out as an illegal start to expression, and I've been unable to get the program to step through an entire directory of files instead of one at a time. Where I'm not clear: I'm note setting an output filename anywhere...whare am I supposed to do that? The path variable won't pass. What's the proper format for a path? Can anyone see what I need to debug here? import java.io.*; public class FileRead { public static void main(String args[]) { try { // Open the file(s) // single file works OK FileInputStream fstream = new FileInputStream("testfile.txt"); Path startingDir = R:\Data\cs\RoboHelp\CorrLib\Output\Production\WebHelp; PrintFiles pf = new PrintFiles(); Files.walkFileTree(startingDir, pf); // Get the object of DataInputStream DataInputStream in = new DataInputStream(fstream); BufferedReader br = new BufferedReader(new InputStreamReader(in)); String inputLine; String desc = ""; String docNo = ""; String replLtr = ""; String specCond = ""; String states = ""; String howGen = ""; String whenGen = ""; String owner = ""; String lastChange = ""; //Read File Line By Line while ((inputLine = br.readLine()) != null) { int testVal=0; int stringMax = inputLine.length(); // if(inputLine.startsWith("Description")) {desc = inputLine.substring(13,inputLine.length());} else if(inputLine.startsWith("Reference Number")) {docNo = inputLine.substring(20,inputLine.length());} else if(inputLine.startsWith("Replaces Letter")) {replLtr = inputLine.substring(17,inputLine.length());} else if(inputLine.startsWith("Special Conditions")) {specCond = inputLine.substring(21,inputLine.length());} else if(inputLine.startsWith("States Applicable")) {states = inputLine.substring(19,inputLine.length());} else if(inputLine.startsWith("How Generated")) {howGen = inputLine.substring(15,inputLine.length());} else if(inputLine.startsWith("When Generated")) {whenGen = inputLine.substring(16,inputLine.length());} else if(inputLine.startsWith("Owner")) {owner = inputLine.substring(7,inputLine.length());} else if(inputLine.startsWith("Last Change Date")) {lastChange = inputLine.substring(17,inputLine.length());} } //close while loop // Print the content on the console String outStr1 = (desc + ";" + docNo + ";" + replLtr + ";" + specCond + ";" + states); String outStr2 = (";" + howGen + ";" + whenGen + ";" + owner + ";" + lastChange); String outString = (outStr1 + outStr2); System.out.print(inputLine + "\n" + outString); String lineItem = (outStr1+outStr2); // try (OutputStream out = new BufferedOutputStream (logfile.newOutputStream(CREATE, APPEND))) { out.write(lineItem, 0, lineItem.length); } catch (IOException x) { System.err.println(x); } public static OutputStream newOutputStream() throws IOException { // append to an existing file, create file if it doesn't initially exist out = Files.newOutputStream(c:, CREATE, APPEND); } //Close the input stream in.close(); } catch (Exception e) { //Catch exception if any System.err.println("Error: " + e.getMessage()); } } }

    Read the article

  • Obama’s win and the geeky stuff behind his success

    - by Gopinath
    Mr. Obama is elected as President of United States for the second term with a great majority. Here are few geeky bytes associated with Mr.Obama’s success and the world records he set up Obama Creates New Records on Twitter and Facebook – Just after winning the race for president, Barak Obama setup world records on Twitter & Facebook. His tweet “Four more years” re-tweeted more than 770K times and his Facebook post received 3.8 million likes. Twitter Kills the Fail Whale, One Tweet at a Time – Twitter handled insane user loads with millions of tweets related to election and proved that it’s platform is now more robust than ever. In a post on the company’s engineering blog, Twitter said people sent 31 million election-related tweets on Tuesday alone. From 8:11 p.m. to 9:11 p.m. P.S.T., Twitter processed an average 9,965 tweets per second, with a one-second peak of 15,107 tweets per second at 8:20 p.m., the company said. Obama’s win a big vindication for Nate Silver, king of the quants – Nate Silver, a statistician and blogger was spot on in predicting Obama’s win many weeks. He did not depend on astrology or surveys to predict Obama’s success. He used big data and statistical analysis to project votes. CNET says “Despite some incredulous political pundits, the FiveThirtyEight statistician appears to have correctly predicted the winner in all 50 states in the presidential election” Inside the Secret World of the Data Crunchers Who Helped Obama Win – Team Obama used big data and analytical systems to win the elections!! Barack Obama Goes On Reddit For Last Campaign Stop Of Political Career – Reditt is getting a lot of Obama’s attention these days. He is quite often stopping by Reditt to say hi to the nerds & geeks hanging out there. His chat with nerds on Reddit has paid rich dividends.

    Read the article

  • Develop an iPad app with MonoTouch, C#, and .NET.

    - by Wallym
    Article url: http://www.devproconnections.com/article/mobile-development/ipad-ios-app-monotouch-143636 Since its release in March 2010, the iPad has taken the world by storm. Each new iPad release has launched the device further and further into our lives. Here are some interesting facts that we have seen over the past few years along with some market share analysis:The school that my teenagers attend here in Knoxville, Tennessee, was the first school in the United States to integrate the iPad into its teaching program and its curriculum. Many schools have since followed suit.There are a healthy number of applications in a variety of market segments. In fact, there is a market for iPad point-of-sale systems.The iPad is a popular device and growing more so each day. comScore states that one in four smartphone owners also owns a tablet. We also know that the iPad comprises 68 percent of the tablet market.eMarketer recently issued a report stating that the number of iPad users is expected to grow by 90 percent in the US in 2012.No matter how you slice the data, tablet usage is growing, and the iPad is currently leading the pack. The question for .NET developers is "How can I get me some of that?" Xamarin's MonoTouch offers help, by providing the means for .NET developers to leverage their C# and .NET coding skills to develop iPad applications. MonoTouch has supported the iPad since the initial release of the iOS 3.2 beta SDK all the way up to the most recent iOS SDK, which supports the iPad. In this article, we'll look at targeting the iPad and how we can take advantage of iPad-specific features in our iOS applications written with MonoTouch.I hope you enjoy the article and you find it helpful.

    Read the article

  • LINQ: Single vs. First

    - by Paulo Morgado
    I’ve witnessed and been involved in several discussions around the correctness or usefulness of the Single method in the LINQ API. The most common argument is that you are querying for the first element on the result set and an exception will be thrown if there’s more than one element. The First method should be used instead, because it doesn’t throw if the result set has more than one item. Although the documentation for Single states that it returns a single, specific element of a sequence of values, it actually returns THE single, specific element of a sequence of ONE value. One you use the Single method in your code you are asserting that your query will result in a scalar result instead of a result set of arbitrary length. On the other hand, the documentation for First states that it returns the first element of a sequence of arbitrary length. Imagine you want to catch a taxi. You go the the taxi line and catch the FIRST one, no matter how many are there. On the other hand, if you go the the parking lot to get your car, you want the SINGLE one specific car that’s yours. If your “query” “returns” more than one car, it’s an exception. Either because it “returned” not only your car or you happen to have more than one car in that parking lot. In either case, you can only drive one car at once and you’ll need to refine your “query”.

    Read the article

  • Get to Know a Candidate (10 of 25): Tom Stevens&ndash;Objectivist Party

    - by Brian Lanham
    DISCLAIMER: This is not a post about “Romney” or “Obama”. This is not a post for whom I am voting. Information sourced for Wikipedia. Stevens is an American professor, attorney, politician and blogger. He is the founder and chairman of the Objectivist Party and was that party's nominee for President in the 2008 and 2012 United States Presidential elections. He is the party's presidential nominee in the 2012 election as well. He is also the founder of the Personal Freedom Party of New York. Stevens was the first vice chairman of the political party Boston Tea Party. He resigned from that position in 2008. In 2010, he announced the formation of the Personal Freedom Party of New York. Stevens runs the blog site Liberty Lion. He is a graduate of New York University and Hofstra University School of Law. Stevens is on the ballot in CO, and FL. The Objectivist Party is a political party in the United States that seeks to promote Ayn Rand's philosophy of Objectivism in the political realm. The party was formed on February 2, 2008 by Thomas Stevens; the date was chosen to coincide with Rand's birthday. The party believes in the repeal of the federal income tax; thus the repeal of the 16th Amendment. The income tax would then be replaced by a Flat Tax of 10% or Federal sales tax. The party supports the 2nd Amendment, but only as long as violent criminals are not permitted to own any weapon. Learn more about Tom Stevens and Objectivist Party on Wikipedia.

    Read the article

  • Get to Know a Candidate (7 of 25): Will Christensen&ndash;Independent American Party

    - by Brian Lanham
    DISCLAIMER: This is not a post about “Romney” or “Obama”. This is not a post for whom I am voting. Information sourced for Wikipedia. NOTE: Wikipedia does not have a page for Christensen.  If you follow links to the party site you can find information about him. Christensen served in the United States Marine Corps and has degrees from Penn State University (my alma mater), Drexel Institute of Technology, University of Utah, and Brigham Young University (BYU) focusing on Math, Physics, and Electrical Engineering.  He has worked for IBM and BYU but for the last 35 years has run small businesses including an Internet book business as well as an Amway franchise. He has held numerous offices in various political parties including, County Campaign Chairman for Barry Goldwater in 1964, County Central Committee, Republican Party; National Committeeman, and State Chairman of the American Party; one of the Founders, and the State Chairman of the Independent American Party of Utah; Vice-Chairman, Chairman, and the Treasurer of the National Independent American Party. The Independent American Party (IAP) officially started in 1998 and began as the Utah Independent American Party. The founders claim to have been inspired by a speech given by Ezra Taft Benson, former United States Secretary of Agriculture, entitled “The Proper Role of Government”. The 15 principles for the proper role of government, taken from his speech, are held as the IAP’s basis for recruiting. Learn more about the Independent American Party on Wikipedia.

    Read the article

  • Top Reasons to Take the MySQL Cluster Training

    - by Antoinette O'Sullivan
    Here are the top reasons to take the authorized MySQL Cluster training course: Take training which was developed by MySQL Cluster product team and delivered by the MySQL Cluster experts at Oracle Learn how to develop, deploy, manage and scale your MySQL Cluster applications more efficiently Keep your mission-critical applications and essential services up and running 24x7 Deliver the highest performance and scalability using MySQL Cluster best practices In this 3 day course, experienced database users learn the important details of clustering necessary to get started with MySQL Cluster, to properly configure and manage the cluster nodes to ensure high availability, to install the different nodes and provide a better understanding of the internals of the cluster. To see the schedule for this course, go to the Oracle University Portal (click on MySQL). Should you not see an event for a location/date that suits you, register your interest in additional events. Here is a small sample of the events already on the schedule for the MySQL Cluster course:  Location  Date  Delivery Language  Prague, Czech Republic  17 September 2012  Czech  Warsaw, Poland  1 August 2012  Polish  London, United Kingdom  18 July 2012  English  Lisbon, Portugal  3 December 2012  European Portugese  Nice, France  8 October 2012  French  Barcelona, Spain  25 September 2012  Spanish  Madrid, Spain  20 August 2012  Spanish  Denver, United States  17 October 2012  English  Chicago, United States  22 August 2012  English  Petaling Jaya, Malaysia  10 October 2012  English  Singapore  21 August 2012  English  Mexico City, Mexico  23 July 2012  Spanish

    Read the article

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