Daily Archives

Articles indexed Sunday October 21 2012

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

  • Swing JTable Scrolling not working properly

    - by Marko
    I'm doing an application, which uses Swing JTable. I used drag and drop in NetBeans, to add the JTable. When I add the JTable, JScrollPane is added automaticly. All the look is done with drag and drop. By pressing the first button, I set the number of rows in the table. This is the code to set my DataModel int size = 50; String[] colNames = {"Indeks", "Ime", "Priimek", "Drzava"}; DefaultTableModel model = new DefaultTableModel(size, colNames.length); model.setColumnIdentifiers(colNames); table.setModel(model); So if the size is, let's say 10, it works OK, since there is no scroll bar. When I add 50 empty rows, when trying to scroll for 5 seconds, it doesn't work properly and crashes in some time. I added the picture, for better understanding (this is what happens to the rows when I scroll up and down for a while). What could be wrong? Am I not using the DataModel as it is supposed to be used, should I .revalidate() or .repaint() the JTable?

    Read the article

  • Affine Transforms with Demo App

    - by Dex
    I have a demo app here https://github.com/rdetert/image-transform-test After importing an image, you can pinch, zoom, rotate the image. What I want to do is save out a 640x480 image (landscape mode) that looks identical to the live preview. So if there are 100px bars of empty space on the sides, I need the same empty bars in the final output (scaled appropriately). This is proving to be more difficult than I thought it would be. I can't quite get it to come out right after days of working on it. The magic method that generates the final image is called -(void)generateFinalImage Good luck! ;)

    Read the article

  • PHP exec error, possibly MAMP using ghostscript

    - by user1762526
    I have been trying to use ghostscript in PHP to convert pdf files to images (png, jpg). I don't really care as long as they are images. This is the code that I used. exec("gs -sDEVICE=jpeg -sOutputFile=/Applications/Mamp/htdocs/cover.jpg -r144 /Applications/Mamp/htdocs/test.pdf"); When I enter the exact same thing, without the exec and quotes obviously, into the command line it does exactly what I want. However, when I run the php file nothing happens. I am using a MAMP server and the server seems to work fine, whenever I run another file with it I have no issues. Anyone have any ideas why it might not execute right?

    Read the article

  • Frame sizing of tableview within nested child controllers/subviews

    - by jwoww
    I'm a bit confused by the proper frame sizing of a table view to fit within my screen. Here's my setup of view controllers within view controllers: UITabBarController UINavigationController as one of the tab bar viewcontrollers; title bar hidden ViewController - a container view controller because I need the option to place some controls beneath the UITableView, sometimes (but not in the current scenario) UITableViewController Now, my question is what the proper frame dimensions of the UITableview should be. Here's what I've got in the ViewController viewDidLoad method. I used subtracted 49.0 (the size of the tab bar) from 480.0. However, this leaves a black bar at the bottom. 20.0 appears to do it (coincidentally?) the size of the status bar, but I don't understand why that would be. Wouldn't the true pixel dimensions of the tableview be 480-49? // MessageTableViewController is my subclass of UITableViewController MessagesTableViewController *vcMessagesTable = [[MessagesTableViewController alloc] init]; CGRect tableViewFrame = CGRectMake(0, 0, 320.0, 480.0 - 49.0); [[vcMessagesTable view] setFrame:tableViewFrame]; self.tableViewController = vcMessagesTable; [self addChildViewController:vcMessagesTable]; [[self view] addSubview:vcMessagesTable.view]; Here's how it looks:

    Read the article

  • Sorting 1 million 8-digit numbers in 1MB of RAM

    - by Favourite Chigozie Onwuemene
    I have a computer with 1M of RAM and no other local storage. I must use it to accept 1 million 8-digit decimal numbers over a TCP connection, sort them, and then send the sorted list out over another TCP connection. The list of numbers may contain duplicates, which I must not discard. The code will be placed in ROM, so I need not subtract the size of my code from the 1M. I already have code to drive the ethernet port and handle TCP/IP connections, and it requires 2k for its state data, including a 1k buffer via which the code will read and write data. Is there a solution to this problem?

    Read the article

  • Core Data: Deleting causes 'NSObjectInaccessibleException' from NSOperation with a reference to a deleted object

    - by Bryan Irace
    My application has NSOperation subclasses that fetch and operate on managed objects. My application also periodically purges rows from the database, which can result in the following race condition: An background operation fetches a bunch of objects (from a thread-specific context). It will iterate over these objects and do something with their properties. A bunch of rows are deleted in the main managed object context. The background operation accesses a property on an object that was deleted from the main context. This results in an 'NSObjectInaccessibleException', reason: 'CoreData could not fulfill a fault' Ideally, the objects that are fetched by the NSOperation can be operated on even if one is deleted in the main context. The best way I can think to achieve this is either to: Call [request setReturnsObjectsAsFaults:NO] to ensure that Core Data won't try to fulfill a fault for an object that no longer exists in the main context. The problem here is I may need to access the object's relationships, which (to my understanding) will still be faulted. Iterate through the managed objects up front and copy the properties I will need into separate non-managed objects. The problem here is that (I think) I will need to synchronize/lock this part, in case an object is deleted in the main context before I can finish copying. Am I missing something obvious? It doesn't seem like what I'm trying to accomplish is too out of the ordinary. Thanks for your help.

    Read the article

  • IP address shows as a hyphen for failed remote desktop connections in Event Log

    - by PsychoDad
    I am trying to figure out why failed remote desktop connections (from Windows remote desktop) show the client ip address as a hyphen. Here is the event log I get when I type the wrong password for an account (the server is completely external to my home computer): <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="Microsoft-Windows-Security-Auditing" Guid="{54849625-5478-4994-A5BA-3E3B0328C30D}" /> <EventID>4625</EventID> <Version>0</Version> <Level>0</Level> <Task>12544</Task> <Opcode>0</Opcode> <Keywords>0x8010000000000000</Keywords> <TimeCreated SystemTime="2012-03-25T19:22:14.694177500Z" /> <EventRecordID>1658501</EventRecordID> <Correlation /> <Execution ProcessID="544" ThreadID="12880" /> <Channel>Security</Channel> <Computer>[Delete for Security Purposes]</Computer> <Security /> </System> <EventData> <Data Name="SubjectUserSid">S-1-0-0</Data> <Data Name="SubjectUserName">-</Data> <Data Name="SubjectDomainName">-</Data> <Data Name="SubjectLogonId">0x0</Data> <Data Name="TargetUserSid">S-1-0-0</Data> <Data Name="TargetUserName">[Delete for Security Purposes]</Data> <Data Name="TargetDomainName">[Delete for Security Purposes]</Data> <Data Name="Status">0xc000006d</Data> <Data Name="FailureReason">%%2313</Data> <Data Name="SubStatus">0xc000006a</Data> <Data Name="LogonType">3</Data> <Data Name="LogonProcessName">NtLmSsp </Data> <Data Name="AuthenticationPackageName">NTLM</Data> <Data Name="WorkstationName">MyComputer</Data> <Data Name="TransmittedServices">-</Data> <Data Name="LmPackageName">-</Data> <Data Name="KeyLength">0</Data> <Data Name="ProcessId">0x0</Data> <Data Name="ProcessName">-</Data> <Data Name="IpAddress">-</Data> <Data Name="IpPort">-</Data> </EventData> </Event> Have found nothing online and am trying to stop terminal services attacks. Any insight is appreciated, I have found nothing online after several hours of seraching...

    Read the article

  • List tags with commits in the same format like git branch -v

    - by NickSoft
    Hi I would like to list tags like it's listed by: # git branch -v * devel e7f5e36 firxed bugs master 63e9c56 remove unused code without the * (you can't checkout tag). It would be good to have an option to list full or short SHA1. A bash script is also fine, but it would be nice to use git commands more and shell scripting less. I've read this question Git - how to tell which commit a tag points to and it helped me, but it's not all I want. Edit: I didn't know that annotated tags had SHA1. I wanted SHA1 of commits that tag points to, not the tags themselfs.

    Read the article

  • What causes a switch port to receive data not destined for it?

    - by user1693454
    We are having an intermittent fault which is effecting one of our control systems on one of our HP Procurve switches. For some reason, this PLC (10mbit port - 192.168.6.56) which is attached directly to the HP Switch intermittantly start's receiving data which is not destined for it. The data is being sent from a Thecus NAS with latest firmware (192.168.6.218) to a physical IBM Server running Win2003R2 and SAP (192.168.6.225). The problem does not just send to this server, it has been to other physical servers in the past too, but always from the Thecus NAS. I am using a monitor port to wireshark what is going in/out of the PLC - normally there would be about 1mb in/out per 2 or 3 minutes - only a server asking the state of the coils. When the problem occurs, there is a flood of data being put onto the PLC line - in this captured instance, about 67mb in less than a minute. Due to this, there is no way that the PLC can be queried as the port is effectively DOSed, in turn killing part of our factory. I know that having Production on the same vlan as IT is not a good idea - I agree, however it cannot be changed at the moment (will have to wait 3 months), as well as the problem has only started happening in the last 3 months. Here is a screen cap of one of the packets being sent from the Thecus NAS which was captured from the PLC port on the HP Switch: And there are over 700 of these in this one 1024kb file. If anyone has any idea on what could be going on, some help would be greatly appreciated. If you need to know anything more, let me know! Cheers!

    Read the article

  • How to setup a simple Ubuntu Server Tomcat cluster on VirtualBox for testing?

    - by Alex Pakka
    I am looking for a step by step instructions to setup at leat two (and later more) simple Ubuntu Virtual Core 12.10 Server VMs on Oracle VirtualBox under Windows 7 64bit. The test setup would be: Apache HTTP server on the Windows host acting as a Load Balancer. The result will be that going to http://localhost:8080 would balance between two nodes and prove session replication. Two lean, small footprint Ubuntu Server guest nodes with Java 7 and Tomcat 7. The intention is to help everyone doing High Availability / Load Balancing development and testing to create a reasonable environment on the local workstation or mainstream notebook in as little time as possible.

    Read the article

  • Add entire 300 GB filesystem to Git Annex repository?

    - by Ryan Lester
    By default, I get an error that I have too many open files from the process. If I lift the limit manually, I get an error that I'm out of memory. For whatever reason, it seems that Git Annex in its current state is not optimised for this sort of task (adding thousands of files to a repository at once). As a possible solution, my next thought was to do something like: cd / find . -type d | git annex add --$NONRECURSIVELY find . -type f | git annex add # Need to add parent directories of each file first or adding files fails The problem with this solution is that there doesn't seem from the documentation to be a way to non-recursively add a directory in Git Annex. Is there something I'm missing or a workaround for this? If my proposed solution is a dead end, are there other ways that people have solved this problem?

    Read the article

  • What is the meaining of "deassert" in this context?

    - by Sam.Rueby
    The English majors over at Dell provided me with this error message provided by a PowerEdge 2950. CPU2 Status: Processor sensors for CPU2, IERR was deasserted I've Googled it, random forum posts aren't providing me with a clear answer. It's also apparently not a word: http://dictionary.reference.com/browse/deassert?s=t I can guess the meaning. Assert: to state with assurance, confidence, or force Okay. So the negative of that. The state of lack-of-confidence? What is this error message trying to tell me? Memory errors were grouped with this one: is it trying to say that IERR for CPU2 should be set, but is not? That the current system state is SNAFU but CPU2 sees everything as fine?

    Read the article

  • Windows 8 will only recognize the Blu Ray ROM, if the install disk is present at boot time [migrated]

    - by aceinthehole
    If I have the install disk in the blu ray ROM drive at boot time and subsequently remove the disk and replace it with blu ray media everything functions as I'd expect. However, if I have no media present, or another disk in the drive at boot time, then windows 8 does not seem to recognize that the blu ray player is even present in the computer. It is not present in the 'my computer' screen, device manager does not show the player, and scanning for new hardware yields nothing. It seems that the driver is installed and working as expect, what is it about having the windows 8 install disk in the drive or not that would cause this kind of behavior?

    Read the article

  • How can an RSA key be placed in a "non-folder"?

    - by Phil
    I lack a lot of knowledge regarding the subject so please excuse me if my question is very ignorant. I just started out with RSA key authentication to my test-server. It did not work at the beginning and I tried and tried and re-tried to no avail. Then I realised, I was creating "mkdir ~/.ssh" and then "mkdir ~/.ssh/authorized_keys" before placing the id_rsa.pub into the latter folder, which did not work. My question is: How can id_rsa.pub be placed in "authorized_keys", which is not created by "mkdir" therefore not a folder? Thank you.

    Read the article

  • Bad utf8 display with tmux

    - by Nison Maël
    When I press the "é" key multiple times on my keyboard, here is what tmux print (notice the spaces) : arcanis@~ > é é é é é é é é é é é é é It also broke emacs when the file contains utf8 characters. My locale is : arcanis@~ > locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= How can I fix this ?

    Read the article

  • BES 5.x issues when connecting to Exchange 2010 SP2 RU4

    - by makerofthings7
    Ever since we updated from SP1 RU4 to SP2 RU4 we have noticed that our BES devices will simply stop receiving email. This has occurred at least 5 times in the past few weeks. Today, while speaking with RIM support (a T3 contract), they said that they have reports of sporadic connectivity issues from some BES users. This has been occurring with Exchange 2010 SP2 RU4, and have no public information to give us. We were able to temporarily get things running by doing any or all of the following Restart the BES server Recreate the MAPI profile (deleted the keys in the registry) Restart the CAS servers Wait it out (2 hours) What other options should I take to resolve this issue?

    Read the article

  • phpmyadmin throws a blank page after installing Zend CE server

    - by infotoknowledge
    I installed LAMP on Ubuntu 12.0.4 LTE. Then I installed phpmyadmin. Everything was good. I used phpadmin to do lots of DB administration.... Then I installed Zend CE server. Now, phpmyadmin throws a blank page. No login screen. So, I reinstalled my VPS in the same sequence again. No luck. Same behavior. This time, I installed Apache, Mysql, PHP and Zend server in that order. Then I installed phpmyadmin....Unfortunately, still blank page on phpmyadmin. Any help?...Thanks in advance.

    Read the article

  • How to block spam site republishing my content

    - by Fo.
    I noticed today that Google search results shows some spam copies of one of my sites. The url looks something like this: http://[subdomain].spamsite.com/www.example.com ...where example.com is my site. In my Apache access logs I'm noticing several lines like the following whenever I load the above url: 127.0.0.1 - - [219/Oct/2012:19:27:34 +0000] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)" The spammer's site shows an exact up to date copy of my site, so I think they are pulling in live data. Any idea how I can block this traffic?

    Read the article

  • ext4: error loading journal

    - by cloudyOutside
    I have an external hard drive with two partitions: A small FAT32 which is mostly empty and works fine and a large ext4 with tons of data, most of which isn't backed up. The ext4 is visible, but can't be mounted. I get an "error loading journal" error. The drive is a Western Digital Caviar Blue 500GB. Roughly 30GB of that is FAT32 and the rest is the ext4. The light on the enclosure turns red when reading from the bad partition. It was made by Cavalry. There wasn't any warning, but coincidentally, I've been thinking lately that I should get two large capacity drives for real backups. Is there anything that can be done? I'm not even sure I have enough storage to backup everything even if it is redeemable.

    Read the article

  • Cannot install wireless lan service on windows 2012 RTM offline

    - by user1763118
    I'm having trouble installing the wireless lan service offline with a fresh installed windows 2012 server RTM. I tried "install-windowsfeature wireless-networking" in the non-gui mode and using the server manager in the gui mode to enable the wireless lan service, but both of them show a "failure configuring windows updates" message after the installation restarted the system. I checked the event log and I think messages about "The WLAN Autoconfig service depends on the following service: nativewifip. This service might not be installed" are the source of the issue. Google shows it is a service called "native wifi filter", but I cannot find anywhere to install that service. I don't have a Ethernet adapter for that computer, so have to install everything offline before the wifi's working.

    Read the article

  • Using Jira on subdomain and not 8080

    - by Sam Hammamy
    I have Jira installed as a service on my Ubuntu VPS on 8080. I've successfully used ProxyPass and ProxyPassReverse to point http://jira.mydomain.com to http://mydomain.com:8080 However, after login, the URL in the browser is changed to http://mydomain.com:8080/Dashboard.... Is there anyway to keep the http://jira.mydomain.com even after login, and throughout the whole user experience? Thanks, Sam

    Read the article

  • HP SmartArray P400: How to repair failed logical drive?

    - by TegtmeierDE
    I have a HP Server with SmartArray P400 controller (incl. 256 MB Cache/Battery Backup) with a logicaldrive with replaced failed physicaldrive that does not rebuild. This is how it looked when I detected the error: ~# /usr/sbin/hpacucli ctrl slot=0 show config Smart Array P400 in Slot 0 (Embedded) (sn: XXXX) array A (SATA, Unused Space: 0 MB) logicaldrive 1 (698.6 GB, RAID 1, OK) physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SATA, 750 GB, OK) physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SATA, 750 GB, OK) array B (SATA, Unused Space: 0 MB) logicaldrive 2 (2.7 TB, RAID 5, Failed) physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SATA, 750 GB, OK) physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SATA, 750 GB, OK) physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SATA, 750 GB, OK) physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SATA, 750 GB, Failed) physicaldrive 2I:1:7 (port 2I:box 1:bay 7, SATA, 750 GB, OK) unassigned physicaldrive 2I:1:8 (port 2I:box 1:bay 8, SATA, 750 GB, OK) ~# I thought that I had drive 2I:1:8 configured as a spare for Array A and Array B, but it seems this was not the case :-(. I noticed the problem due to I/O errors on the host, even if only 1 physicaldrive of the RAID5 is failed. Does someone know why this could happen? The logicaldrive should go into "Degraded" mode but still be fully accessible from the host os!? I first tried to add the unassigned drive 2I:1:8 as a spare to logicaldrive 2, but this was not possible: ~# /usr/sbin/hpacucli ctrl slot=0 array B add spares=2I:1:8 Error: This operation is not supported with the current configuration. Use the "show" command on devices to show additional details about the configuration. ~# Interestingly it is possible to add the unassigned drive to the first array without problems. I thought maybe the controller put the array into "failed" state due to the missing spare and protects failed arrays from modification. So I tried was to reenable the logicaldrive (to add the spare afterwards): ~# /usr/sbin/hpacucli ctrl slot=0 ld 2 modify reenable Warning: Any previously existing data on the logical drive may not be valid or recoverable. Continue? (y/n) y Error: This operation is not supported with the current configuration. Use the "show" command on devices to show additional details about the configuration. ~# But as you can see, re-enabling the logicaldrive this was not possible. Now I replaced the failed drive by hotswapping it with the unassigned drive. The status now looks like this: ~# /usr/sbin/hpacucli ctrl slot=0 show config Smart Array P400 in Slot 0 (Embedded) (sn: XXXX) array A (SATA, Unused Space: 0 MB) logicaldrive 1 (698.6 GB, RAID 1, OK) physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SATA, 750 GB, OK) physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SATA, 750 GB, OK) array B (SATA, Unused Space: 0 MB) logicaldrive 2 (2.7 TB, RAID 5, Failed) physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SATA, 750 GB, OK) physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SATA, 750 GB, OK) physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SATA, 750 GB, OK) physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SATA, 750 GB, OK) physicaldrive 2I:1:7 (port 2I:box 1:bay 7, SATA, 750 GB, OK) ~# The logical drive is still not accessible. Why is it not rebuilding? What can I do? FYI, this is the configuration of my controller: ~# /usr/sbin/hpacucli ctrl slot=0 show Smart Array P400 in Slot 0 (Embedded) Bus Interface: PCI Slot: 0 Serial Number: XXXX Cache Serial Number: XXXX RAID 6 (ADG) Status: Enabled Controller Status: OK Chassis Slot: Hardware Revision: Rev E Firmware Version: 5.22 Rebuild Priority: Medium Expand Priority: Medium Surface Scan Delay: 15 secs Surface Analysis Inconsistency Notification: Disabled Raid1 Write Buffering: Disabled Post Prompt Timeout: 0 secs Cache Board Present: True Cache Status: OK Accelerator Ratio: 25% Read / 75% Write Drive Write Cache: Disabled Total Cache Size: 256 MB No-Battery Write Cache: Disabled Cache Backup Power Source: Batteries Battery/Capacitor Count: 1 Battery/Capacitor Status: OK SATA NCQ Supported: True ~# Thanks for you help in advance.

    Read the article

  • Nginx Tornado Combination Causing 502 Bad Gateway Errors

    - by PlaidFan
    We are facing a problem with inconsistent 502 errors and tracking down the reasons has been a very frustrating exercise. We can reproduce the problem by sending several simultaneous requests quickly. The problem is that several is only in the range of 10 to 20 within a 5 seconds (not a typo). So clearly this type of load should be handled easily. We really like the Nginx + Tornado approach but are considering going to a more traditional (e.g. threading) approach because this problem has been very difficult to solve. I was wondering if you a) know how to fix this issue and b) how we can tracked down the culprit(s). The log files simply identify there being a connection refused. We have the same problem as this post: How do I debug a HTTP 502 error? But there is no answer provided on how to solve the problem so I'm hoping you can help because this may be a common issue with this type of setup. Thanks in advance, Paul

    Read the article

  • How do I enable TUN/TAP forwarding?

    - by rafal
    I have a program which writes packets (destination address 10.3.0.2) to the TUN/TAP interface. Network: host1|tun0----eth1(10.3.0.1)|-------------------host2|eth1(10.3.0.2)| Wireshark captures these packets from interface tun0 but they are not forwarded to interface eth1. Commands: sysctl -w net.ipv4.ip_forward=1 sysctl -p iptables -A INPUT -i tun+ -j ACCEPT iptables -A FORWARD -i tun+ -j ACCEPT iptables -A INPUT -i tap+ -j ACCEPT iptables -A FORWARD -i tap+ -j ACCEPT /etc/init.d/networking restart /etc/init.d/openvpn restart

    Read the article

  • How do I fix Nginx config to work with multiple hosts of Unicorn?

    - by fred deAlmeida
    I have no problem instantiating multiple instances of unicorn on different unix sockets and ports. Works fine if I do url:port. My problem comes in correctly formatting nginx.conf to allow multipe upstream conditions. Whatever i do does not seem to work. One instance is fine works fine. Multiple gives me a ""upstream" directive is not allowed here error I am using the base nginx sample from the unicorn site. and doubling up the upstream area with differing terms. each is part of the http set. Any help would be amazing!

    Read the article

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