Search Results

Search found 92 results on 4 pages for 'dane jung'.

Page 1/4 | 1 2 3 4  | Next Page >

  • How do i use GraphMLReader2 in Jung?

    - by askus
    I want to use class GraphMLReader to read a Undirected Graph from graphML with JUNG2.0. The code is as follow: import edu.uci.ics.jung.io.*; import edu.uci.ics.jung.io.graphml.*; import java.io.*; import java.util.*; import org.apache.commons.collections15.Transformer; import edu.uci.ics.jung.graph.*; class Vertex{ int id; String type; String value; } class Edge{ int id ; String type; String value; } public class Loader{ static String src = "test.xsl"; public static void Main( String[] args){ Reader reader = new FileReader(src ); Transformer<NodeMetadata, Vertex> vtrans = new Transformer<NodeMetadata,Vertex>(){ public Vertex transform(NodeMetadata nmd ){ Vertex v = new Vertex() ; v.type = nmd.getProperty("type"); v.value = nmd.getProperty("value"); v.id = Integer.valueOf( nmd.getId() ); return v; } }; Transformer<EdgeMetadata, Edge> etrans = new Transformer<EdgeMetadata,Edge>(){ public Edge transform( EdgeMetadata emd ){ Edge e = new Edge() ; e.type = emd.getProperty("type"); e.value = emd.getProperty("value"); e.id = Integer.valueOf( emd.getId() ); return e; } }; Transformer<HyperEdgeMetadata, Edge> hetrans = new Transformer<HyperEdgeMetadata,Edge>(){ public Edge transform( HyperEdgeMetadata emd ){ Edge e = new Edge() ; e.type = emd.getProperty("type"); e.value = emd.getProperty("value"); e.id = Integer.valueOf( emd.getId() ); return e; } }; Transformer< GraphMetadata , UndirectedSparseGraph> gtrans = new Transformer<GraphMetadata,UndirectedSparseGraph>(){ public UndirectedSparseGraph<Vertex,Edge> transform( GraphMetadata gmd ){ return new UndirectedSparseGraph<Vertex,Edge>(); } }; GraphMLReader2< UndirectedSparseGraph<Vertex,Edge> , Vertex , Edge> gmlr = new GraphMLReader2< UndirectedSparseGraph<Vertex,Edge> ,Vertex, Edge>( reader, gtrans, vtrans, etrans, hetrans); UndirectedSparseGraph<Vertex,Edge> g = gmlr.readGraph(); return ; } } However, compiler alert that: Loader.java:60: cannot find symbol symbol : constructor GraphMLReader2(java.io.Reader,org.apache.commons.collections15.Transformer<edu.uci.ics.jung.io.graphml.GraphMetadata,edu.uci.ics.jung.graph.UndirectedSparseGraph>,org.apache.commons.collections15.Transformer<edu.uci.ics.jung.io.graphml.NodeMetadata,Vertex>,org.apache.commons.collections15.Transformer<edu.uci.ics.jung.io.graphml.EdgeMetadata,Edge>) location: class edu.uci.ics.jung.io.graphml.GraphMLReader2<edu.uci.ics.jung.graph.UndirectedSparseGraph<Vertex,Edge>,Vertex,Edge> new GraphMLReader2< UndirectedSparseGraph<Vertex,Edge> ,Vertex, Edge>( ^ 1 error How can i solve this problem? Thanks.

    Read the article

  • Jung Meets the NetBeans Platform

    - by Geertjan
    Here's a small Jung diagram in a NetBeans Platform application: And the code, copied directly from the Jung 2.0 Tutorial:  public final class JungTopComponent extends TopComponent { public JungTopComponent() { initComponents(); setName(Bundle.CTL_JungTopComponent()); setToolTipText(Bundle.HINT_JungTopComponent()); setLayout(new BorderLayout()); Graph sgv = getGraph(); Layout<Integer, String> layout = new CircleLayout(sgv); layout.setSize(new Dimension(300, 300)); BasicVisualizationServer<Integer, String> vv = new BasicVisualizationServer<Integer, String>(layout); vv.setPreferredSize(new Dimension(350, 350)); add(vv, BorderLayout.CENTER); } public Graph getGraph() { Graph<Integer, String> g = new SparseMultigraph<Integer, String>(); g.addVertex((Integer) 1); g.addVertex((Integer) 2); g.addVertex((Integer) 3); g.addEdge("Edge-A", 1, 2); g.addEdge("Edge-B", 2, 3); Graph<Integer, String> g2 = new SparseMultigraph<Integer, String>(); g2.addVertex((Integer) 1); g2.addVertex((Integer) 2); g2.addVertex((Integer) 3); g2.addEdge("Edge-A", 1, 3); g2.addEdge("Edge-B", 2, 3, EdgeType.DIRECTED); g2.addEdge("Edge-C", 3, 2, EdgeType.DIRECTED); g2.addEdge("Edge-P", 2, 3); return g; } And here's what someone who attended a NetBeans Platform training course in Poland has done with Jung and the NetBeans Platform: The source code for the above is on Git: git://gitorious.org/j2t/j2t.git

    Read the article

  • Creating an adjacency Matrix from a JUNG Graph.

    - by prince
    Graph < Integer, Integer> g = new SparseMultigraph<Integer, Integer>(); g.addVertex(1);g.addVertex(2);g.addVertex(3); g.addEdge(0,1,2 ,EdgeType.DIRECTED);g.addEdge(1,2,3 ,EdgeType.DIRECTED);g.addEdge(2,3,1 ,EdgeType.DIRECTED);g.addEdge(3,1,3 ,EdgeType.DIRECTED); How can I convert this graph into an adjacency matrix taking into consideration that it is a directed graph.

    Read the article

  • Error when opening .tar.gz via Shell to install Apache Maven

    - by adamsquared
    Thank you in advance for the help. My Goal: To install apache maven per its websites instructions (http://maven.apache.org/download.html), in order to install the JUNG package according to its install instructions (http://sourceforge.net/apps/trac/jung/wiki/JUNGManual), so I can use the JUNG classes in various Java GUIs. The Problem: I get an error message when I try to extract the apache-maven .gz (install?) file in shell. Background: I'm trying to install the JUNG (http://jung.sourceforge.net/index.html) package to my system's Java, so I can write object-oriented code using various GUIs (Ecliplse, Dr. Java) using the classes in JUNG. I don't understand how the building/installing process works, and how I can get what I build/install to work on various GUIs and the command line. I'm new to shell and the command line, and mostly have experience using a simple IDE (DrJava, Python IDLE, R GUI) to write and compile object-oriented code. Machine: Mac OSX 10.5.8 32-bit. The Instructions: For the maven building Extract the distribution archive, i.e. apache-maven-3.0.4-bin.tar.gz to the directory you wish to install Maven 3.0.4. These instructions assume you chose /usr/local/apache-maven. The subdirectory apache-maven-3.0.4 will be created from the archive. ... for the JUNG installation Appendix: How to Build JUNG This is a brief intro to building JUNG jars with maven2 (the build system that JUNG currently uses). First, ensure that you have a JDK of at least version 1.5: JUNG 2.0+ requires Java 1.5+. Ensure that your JAVA_HOME variable is set to the location of the JDK. On a Windows platform, you may have a separate JRE (Java Runtime Environment) and JDK (Java Development Kit). The JRE has no capability to compile Java source files, so you must have a JDK installed. If your JAVA_HOME variable is set to the location of the JRE, and not the location of the JDK, you will be unable to compile. Get Maven Download and install maven2 from maven.apache.org: http://maven.apache.org/download.html At time of writing (early December 2009), the latest version was maven-2.2.1. Install the downloaded maven2 (there are installation instructions on the Maven website). Follow the installation instructions and confirm a successful installation by typing 'mvn --version' in a command terminal window. Get JUNG ... What I Did: I downloaded the file apache-maven-2.2.1-bin.tar.gz. The JUNG website specified to use apache maven 2. I wanted to stick to the recommended installation instructions, but I couldn't get to /usr on my GUI (i've noticed you click on the MacHD symbol on the desktop its missing several directories/folders that you can see using the shell using the ls command at root directory I couldn't find a way to access the file using my mac GUI. Therefore, I used the shell to navigate to the root directory and then to /usr/local, and used the mkdir command to make the directory apache-maven and entered it. I then moved the file using the mv command. Next I tried extracting the file using tar -zxvf apache-maven-2.2.1-bin.tar.gz. The Error Message: tar: apache-maven-2.2.1/direcoryandfile: Cannot open: No such file or directory ... apache-maven-2.2.1/lib/ext: Cannot mkdir: No such file or directory apache-maven-2.2.1/lib/ext/README.txt tar: apache-maven-2.2.1/lib/ext/README.txt: Cannot open: No such file or directory tar: Error exit delayed from previous errors From what I can tell the archive file is missing some directories or something. I tried deleting the file, redownloading the .tar.gz file from a different mirror and repeating the process. Same result. Thanks again for the help

    Read the article

  • How can I split Excel data from one row into multiple rows

    - by Lenny
    Good afternoon, Is there a way to split data from one row and store to separate rows? I have a large file that contains scheduling information and I'm trying to develop a list that comprises each combination of course, day, term and period per line. For example I have a file similiar to this: Crs:Sn Title Tchr TchrName Room Days Terms Periods 7014:01 English I 678 JUNG 300 M,T,W,R,F 3,4 2,3 1034:02 English II 123 MOORE 352 M,T,W,R,F 3 4 7144:02 Algebra 238 VYSOTSKY 352 M,T,W,R,F 3,4 3,4 0180:06 Pub Speaking 23 ROSEN 228 M,T,W,R,F 3,4 5 7200:03 PE I 244 HARILAOU GYM 4 M,T,W,R,F 1,2,3 3 2101:01 Physics/Lab 441 JONES 348 M,T,W,R,F 1,2,3,4 2,3 Should extract to this in an excel file: Crs:Sn Title Tchr# Tchr Room Days Terms Period 7014:01 English I 678 JUNG 300 M 3 2 7014:01 English I 678 JUNG 300 T 3 2 7014:01 English I 678 JUNG 300 W 3 2 7014:01 English I 678 JUNG 300 R 3 2 7014:01 English I 678 JUNG 300 F 3 2 7014:01 English I 678 JUNG 300 M 4 2 7014:01 English I 678 JUNG 300 T 4 2 7014:01 English I 678 JUNG 300 W 4 2 7014:01 English I 678 JUNG 300 R 4 2 7014:01 English I 678 JUNG 300 F 4 2 7014:01 English I 678 JUNG 300 M 3 3 7014:01 English I 678 JUNG 300 T 3 3 7014:01 English I 678 JUNG 300 W 3 3 7014:01 English I 678 JUNG 300 R 3 3 7014:01 English I 678 JUNG 300 F 3 3 7014:01 English I 678 JUNG 300 M 4 3 7014:01 English I 678 JUNG 300 T 4 3 7014:01 English I 678 JUNG 300 W 4 3 7014:01 English I 678 JUNG 300 R 4 3 7014:01 English I 678 JUNG 300 F 4 3 1034:02 English II 123 MOORE 352 M 3 4 1034:02 English II 123 MOORE 352 T 3 4 1034:02 English II 123 MOORE 352 W 3 4 1034:02 English II 123 MOORE 352 R 3 4 1034:02 English II 123 MOORE 352 F 3 4 7144:02 Algebra 238 VYSOTSKY 352 M 3 3 7144:02 Algebra 238 VYSOTSKY 352 T 3 3 7144:02 Algebra 238 VYSOTSKY 352 W 3 3 7144:02 Algebra 238 VYSOTSKY 352 R 3 3 7144:02 Algebra 238 VYSOTSKY 352 F 3 3 7144:02 Algebra 238 VYSOTSKY 352 M 4 3 7144:02 Algebra 238 VYSOTSKY 352 T 4 3 7144:02 Algebra 238 VYSOTSKY 352 W 4 3 7144:02 Algebra 238 VYSOTSKY 352 R 4 3 7144:02 Algebra 238 VYSOTSKY 352 F 4 3 7144:02 Algebra 238 VYSOTSKY 352 M 3 4 7144:02 Algebra 238 VYSOTSKY 352 T 3 4 7144:02 Algebra 238 VYSOTSKY 352 W 3 4 7144:02 Algebra 238 VYSOTSKY 352 R 3 4 7144:02 Algebra 238 VYSOTSKY 352 F 3 4 7144:02 Algebra 238 VYSOTSKY 352 M 4 4 7144:02 Algebra 238 VYSOTSKY 352 T 4 4 7144:02 Algebra 238 VYSOTSKY 352 W 4 4 7144:02 Algebra 238 VYSOTSKY 352 R 4 4 7144:02 Algebra 238 VYSOTSKY 352 F 4 4 0180:06 Pub Speaking 23 ROSEN 228 M 3 5 0180:06 Pub Speaking 23 ROSEN 228 T 3 5 0180:06 Pub Speaking 23 ROSEN 228 W 3 5 0180:06 Pub Speaking 23 ROSEN 228 R 3 5 0180:06 Pub Speaking 23 ROSEN 228 F 3 5 0180:06 Pub Speaking 23 ROSEN 228 M 4 5 0180:06 Pub Speaking 23 ROSEN 228 T 4 5 0180:06 Pub Speaking 23 ROSEN 228 W 4 5 0180:06 Pub Speaking 23 ROSEN 228 R 4 5 0180:06 Pub Speaking 23 ROSEN 228 F 4 5 7200:03 PE I 244 HARILAOU GYM 4 M 1 3 7200:03 PE I 244 HARILAOU GYM 4 M 2 3 7200:03 PE I 244 HARILAOU GYM 4 M 3 3 7200:03 PE I 244 HARILAOU GYM 4 T 1 3 7200:03 PE I 244 HARILAOU GYM 4 T 2 3 7200:03 PE I 244 HARILAOU GYM 4 T 3 3 7200:03 PE I 244 HARILAOU GYM 4 W 1 3 7200:03 PE I 244 HARILAOU GYM 4 W 2 3 7200:03 PE I 244 HARILAOU GYM 4 W 3 3 7200:03 PE I 244 HARILAOU GYM 4 R 1 3 7200:03 PE I 244 HARILAOU GYM 4 R 2 3 7200:03 PE I 244 HARILAOU GYM 4 R 3 3 7200:03 PE I 244 HARILAOU GYM 4 F 1 3 7200:03 PE I 244 HARILAOU GYM 4 F 2 3 7200:03 PE I 244 HARILAOU GYM 4 F 3 3 2101:01 Physics/Lab 441 JONES 348 M 1 2 2101:01 Physics/Lab 441 JONES 348 M 2 2 2101:01 Physics/Lab 441 JONES 348 M 3 2 2101:01 Physics/Lab 441 JONES 348 M 4 2 2101:01 Physics/Lab 441 JONES 348 T 1 2 2101:01 Physics/Lab 441 JONES 348 T 2 2 2101:01 Physics/Lab 441 JONES 348 T 3 2 2101:01 Physics/Lab 441 JONES 348 T 4 2 2101:01 Physics/Lab 441 JONES 348 W 1 2 2101:01 Physics/Lab 441 JONES 348 W 2 2 2101:01 Physics/Lab 441 JONES 348 W 3 2 2101:01 Physics/Lab 441 JONES 348 W 4 2 2101:01 Physics/Lab 441 JONES 348 R 1 2 2101:01 Physics/Lab 441 JONES 348 R 2 2 2101:01 Physics/Lab 441 JONES 348 R 3 2 2101:01 Physics/Lab 441 JONES 348 R 4 2 2101:01 Physics/Lab 441 JONES 348 F 1 2 2101:01 Physics/Lab 441 JONES 348 F 2 2 2101:01 Physics/Lab 441 JONES 348 F 3 2 2101:01 Physics/Lab 441 JONES 348 F 4 2 2101:01 Physics/Lab 441 JONES 348 M 1 3 2101:01 Physics/Lab 441 JONES 348 M 2 3 2101:01 Physics/Lab 441 JONES 348 M 3 3 2101:01 Physics/Lab 441 JONES 348 M 4 3 2101:01 Physics/Lab 441 JONES 348 T 1 3 2101:01 Physics/Lab 441 JONES 348 T 2 3 2101:01 Physics/Lab 441 JONES 348 T 3 3 2101:01 Physics/Lab 441 JONES 348 T 4 3 2101:01 Physics/Lab 441 JONES 348 W 1 3 2101:01 Physics/Lab 441 JONES 348 W 2 3 2101:01 Physics/Lab 441 JONES 348 W 3 3 2101:01 Physics/Lab 441 JONES 348 W 4 3 2101:01 Physics/Lab 441 JONES 348 R 1 3 2101:01 Physics/Lab 441 JONES 348 R 2 3 2101:01 Physics/Lab 441 JONES 348 R 3 3 2101:01 Physics/Lab 441 JONES 348 R 4 3 2101:01 Physics/Lab 441 JONES 348 F 1 3 2101:01 Physics/Lab 441 JONES 348 F 2 3 2101:01 Physics/Lab 441 JONES 348 F 3 3 2101:01 Physics/Lab 441 JONES 348 F 4 3 I'm trying to avoid going line by line separating the data. I'm not well versed on the VBA functionality of Excel, but would like to get started using it. Any help would be greatly appreciated.

    Read the article

  • How do I get a Dane-Elec mp3/mp4 player working?

    - by user40432
    My MP3/MP4 does not plug-in and play and therefore I can not transfer any file to the MP3/MP4 dane-elec music my touch or only dane-elec with 8 gb in memory and perhapses model zt1 with radio,..and microsdhc card slot following the above link the mp3/mp4 is there and it is MP3 Player: TOUCH MY MUSIC and the complete information is on this site http://www.danedigital.com/8-Music-Media-Players/2-music-touch.html as the Technical Specifications MP3 Player: TOUCH MY MUSIC The Mp4 player has a very classy. It allows its users to play music and view photos and video. His fluent interface, its touch-pad, his radio and RDS Micro SDHC reader makes him a very complete device will become the ideal musical companion. ubuntu i am with is ubuntu 11.10 kernel 3.0.0-14-generic the latest I tried to install many applications but nothing worked. With disk utility I can see that Ubuntu can recognize something, that as a peripheral device named rockchip usbdisk user and rockchip usbdisk sd, and i can plug and play other devices, and only this mp3/mp4 do not connect to the computer with ubuntu and the device as no problem working disconnected to computer I try to see if work on Windows and it does! I can see the device and transfer files to the MP3/MP4 dane-elec folder device and use FAT32. So why can not do on Ubuntu!? What can I do and why does not work on Ubuntu? What is wrong with it? Here are the logs: Jan 4 17:27:34 a-ubuntu kernel: [ 141.948863] init: apport pre-start process (1970) terminated with status 1 Jan 4 17:27:34 a-ubuntu kernel: [ 141.963202] init: apport post-stop process (1994) terminated with status 1 Jan 4 17:30:02 a-ubuntu kernel: [ 289.564049] usb 2-4: new high speed USB device number 3 using ehci_hcd Jan 4 17:30:02 a-ubuntu kernel: [ 289.988706] usbcore: registered new interface driver uas Jan 4 17:30:02 a-ubuntu kernel: [ 289.992056] Initializing USB Mass Storage driver... Jan 4 17:30:02 a-ubuntu kernel: [ 289.992272] scsi6 : usb-storage 2-4:1.0 Jan 4 17:30:02 a-ubuntu kernel: [ 289.993082] usbcore: registered new interface driver usb-storage Jan 4 17:30:02 a-ubuntu kernel: [ 289.993088] USB Mass Storage support registered. Jan 4 17:30:03 a-ubuntu kernel: [ 290.996887] scsi 6:0:0:0: Direct-Access RockChip USBDISK User 1.00 PQ: 0 ANSI: 0 Jan 4 17:30:03 a-ubuntu kernel: [ 290.997372] scsi 6:0:0:1: Direct-Access RockChip USBDISK SD 1.00 PQ: 0 ANSI: 0 Jan 4 17:30:03 a-ubuntu kernel: [ 290.997478] scsi: killing requests for dead queue Jan 4 17:30:03 a-ubuntu kernel: [ 291.002712] scsi: killing requests for dead queue Jan 4 17:30:03 a-ubuntu kernel: [ 291.002880] scsi: killing requests for dead queue Jan 4 17:30:04 a-ubuntu kernel: [ 291.016249] scsi: killing requests for dead queue Jan 4 17:30:04 a-ubuntu kernel: [ 291.032252] scsi: killing requests for dead queue Jan 4 17:30:04 a-ubuntu kernel: [ 291.048182] scsi: killing requests for dead queue Jan 4 17:30:04 a-ubuntu kernel: [ 291.060178] scsi: killing requests for dead queue Jan 4 17:30:04 a-ubuntu kernel: [ 291.060357] scsi: killing requests for dead queue Jan 4 17:30:04 a-ubuntu kernel: [ 291.080381] sd 6:0:0:0: Attached scsi generic sg2 type 0 Jan 4 17:30:04 a-ubuntu kernel: [ 291.080646] sd 6:0:0:1: Attached scsi generic sg3 type 0 Jan 4 17:30:04 a-ubuntu kernel: [ 291.088381] sd 6:0:0:0: [sdb] 16015360 512-byte logical blocks: (8.19 GB/7.63 GiB) Jan 4 17:30:04 a-ubuntu kernel: [ 291.088988] sd 6:0:0:1: [sdc] Attached SCSI removable disk Jan 4 17:30:04 a-ubuntu kernel: [ 291.200050] usb 2-4: reset high speed USB device number 3 using ehci_hcd Jan 4 17:30:04 a-ubuntu kernel: [ 291.448044] usb 2-4: reset high speed USB device number 3 using ehci_hcd Jan 4 17:30:04 a-ubuntu kernel: [ 291.696055] usb 2-4: reset high speed USB device number 3 using ehci_hcd Jan 4 17:30:04 a-ubuntu kernel: [ 291.832046] sd 6:0:0:0: [sdb] Test WP failed, assume Write Enabled Jan 4 17:30:04 a-ubuntu kernel: [ 291.832994] sd 6:0:0:0: [sdb] Asking for cache data failed Jan 4 17:30:04 a-ubuntu kernel: [ 291.833001] sd 6:0:0:0: [sdb] Assuming drive cache: write through Jan 4 17:30:04 a-ubuntu kernel: [ 291.834378] sdb: detected capacity change from 8199864320 to 0 Jan 4 17:30:04 a-ubuntu kernel: [ 291.835367] sd 6:0:0:0: [sdb] Attached SCSI removable disk Jan 4 17:30:06 a-ubuntu kernel: [ 293.004741] sd 6:0:0:0: [sdb] 16015360 512-byte logical blocks: (8.19 GB/7.63 GiB) Jan 4 17:30:06 a-ubuntu kernel: [ 293.116051] usb 2-4: reset high speed USB device number 3 using ehci_hcd Jan 4 17:30:21 a-ubuntu kernel: [ 308.228043] usb 2-4: device descriptor read/64, error -110 Jan 4 17:30:36 a-ubuntu kernel: [ 323.444072] usb 2-4: device descriptor read/64, error -110 Jan 4 17:30:36 a-ubuntu kernel: [ 323.660047] usb 2-4: reset high speed USB device number 3 using ehci_hcd Jan 4 17:30:51 a-ubuntu kernel: [ 338.772085] usb 2-4: device descriptor read/64, error -110 Jan 4 17:31:06 a-ubuntu kernel: [ 353.988064] usb 2-4: device descriptor read/64, error -110 Jan 4 17:31:07 a-ubuntu kernel: [ 354.204058] usb 2-4: reset high speed USB device number 3 using ehci_hcd Jan 4 17:31:12 a-ubuntu kernel: [ 359.224115] usb 2-4: device descriptor read/8, error -110 Jan 4 17:31:17 a-ubuntu kernel: [ 364.344136] usb 2-4: device descriptor read/8, error -110 Jan 4 17:31:17 a-ubuntu kernel: [ 364.560037] usb 2-4: reset high speed USB device number 3 using ehci_hcd Jan 4 17:31:22 a-ubuntu kernel: [ 369.580132] usb 2-4: device descriptor read/8, error -110 Jan 4 17:31:27 a-ubuntu kernel: [ 374.700126] usb 2-4: device descriptor read/8, error -110 Jan 4 17:31:27 a-ubuntu kernel: [ 374.804121] usb 2-4: USB disconnect, device number 3 Jan 4 17:31:27 a-ubuntu kernel: [ 374.804518] sd 6:0:0:0: Device offlined - not ready after error recovery Jan 4 17:31:27 a-ubuntu kernel: [ 374.804600] sd 6:0:0:0: [sdb] No Caching mode page present Jan 4 17:31:27 a-ubuntu kernel: [ 374.804606] sd 6:0:0:0: [sdb] Assuming drive cache: write through Jan 4 17:31:27 a-ubuntu kernel: [ 374.804693] sd 6:0:0:0: [sdb] READ CAPACITY failed Jan 4 17:31:27 a-ubuntu kernel: [ 374.804698] sd 6:0:0:0: [sdb] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK Jan 4 17:31:27 a-ubuntu kernel: [ 374.804704] sd 6:0:0:0: [sdb] Sense not available. Jan 4 17:31:27 a-ubuntu kernel: [ 374.804744] sd 6:0:0:0: [sdb] No Caching mode page present Jan 4 17:31:27 a-ubuntu kernel: [ 374.804748] sd 6:0:0:0: [sdb] Assuming drive cache: write through Jan 4 17:31:27 a-ubuntu kernel: [ 374.804754] sdb: detected capacity change from 8199864320 to 0 Jan 4 17:31:27 a-ubuntu kernel: [ 374.820273] scsi: killing requests for dead queue Jan 4 17:31:27 a-ubuntu kernel: [ 374.852240] scsi: killing requests for dead queue Jan 4 17:31:27 a-ubuntu kernel: [ 374.980054] usb 2-4: new high speed USB device number 4 using ehci_hcd Jan 4 17:31:43 a-ubuntu kernel: [ 390.092059] usb 2-4: device descriptor read/64, error -110 Jan 4 17:31:58 a-ubuntu kernel: [ 405.308070] usb 2-4: device descriptor read/64, error -110 Jan 4 17:31:58 a-ubuntu kernel: [ 405.524078] usb 2-4: new high speed USB device number 5 using ehci_hcd and the other post is: http://pastebin.ubuntu.com/792915/ and the other bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x04f2 Chicony Electronics Co., Ltd idProduct 0xb008 USB 2.0 Camera bcdDevice 93.27 iManufacturer 2 Chicony Electronics Co., Ltd. iProduct 1 Chicony USB 2.0 Camera iSerial 3 SN0001 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 565 bNumInterfaces 2 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 0 bInterfaceCount 2 bFunctionClass 14 Video bFunctionSubClass 3 Video Interface Collection bFunctionProtocol 0 iFunction 1 Chicony USB 2.0 Camera Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 1 Video Control bInterfaceProtocol 0 iInterface 1 Chicony USB 2.0 Camera VideoControl Interface Descriptor: bLength 13 bDescriptorType 36 bDescriptorSubtype 1 (HEADER) bcdUVC 1.00 wTotalLength 77 dwClockFrequency 15.000000MHz bInCollection 1 baInterfaceNr( 0) 1 VideoControl Interface Descriptor: bLength 9 bDescriptorType 36 bDescriptorSubtype 3 (OUTPUT_TERMINAL) bTerminalID 2 wTerminalType 0x0101 USB Streaming bAssocTerminal 0 bSourceID 4 iTerminal 0 VideoControl Interface Descriptor: bLength 26 bDescriptorType 36 bDescriptorSubtype 6 (EXTENSION_UNIT) bUnitID 4 guidExtensionCode {7033f028-1163-2e4a-ba2c-6890eb334016} bNumControl 1 bNrPins 1 baSourceID( 0) 3 bControlSize 1 bmControls( 0) 0x01 iExtension 0 VideoControl Interface Descriptor: bLength 18 bDescriptorType 36 bDescriptorSubtype 2 (INPUT_TERMINAL) bTerminalID 1 wTerminalType 0x0201 Camera Sensor bAssocTerminal 0 iTerminal 0 wObjectiveFocalLengthMin 0 wObjectiveFocalLengthMax 0 wOcularFocalLength 0 bControlSize 3 bmControls 0x00000000 VideoControl Interface Descriptor: bLength 11 bDescriptorType 36 bDescriptorSubtype 5 (PROCESSING_UNIT) Warning: Descriptor too short bUnitID 3 bSourceID 1 wMaxMultiplier 0 bControlSize 2 bmControls 0x0000053f Brightness Contrast Hue Saturation Sharpness Gamma Backlight Compensation Power Line Frequency iProcessing 0 bmVideoStandards 0x a NTSC - 525/60 SECAM - 625/50 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0010 1x 16 bytes bInterval 6 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 VideoStreaming Interface Descriptor: bLength 14 bDescriptorType 36 bDescriptorSubtype 1 (INPUT_HEADER) bNumFormats 1 wTotalLength 345 bEndPointAddress 129 bmInfo 0 bTerminalLink 2 bStillCaptureMethod 0 bTriggerSupport 1 bTriggerUsage 0 bControlSize 1 bmaControls( 0) 27 VideoStreaming Interface Descriptor: bLength 27 bDescriptorType 36 bDescriptorSubtype 4 (FORMAT_UNCOMPRESSED) bFormatIndex 1 bNumFrameDescriptors 7 guidFormat {59555932-0000-1000-8000-00aa00389b71} bBitsPerPixel 16 bDefaultFrameIndex 1 bAspectRatioX 0 bAspectRatioY 0 bmInterlaceFlags 0x00 Interlaced stream or variable: No Fields per frame: 2 fields Field 1 first: No Field pattern: Field 1 only bCopyProtect 0 VideoStreaming Interface Descriptor: bLength 46 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 1 bmCapabilities 0x00 Still image unsupported wWidth 640 wHeight 480 dwMinBitRate 614400 dwMaxBitRate 18432000 dwMaxVideoFrameBufferSize 614400 dwDefaultFrameInterval 333333 bFrameIntervalType 5 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 500000 dwFrameInterval( 2) 666666 dwFrameInterval( 3) 1000000 dwFrameInterval( 4) 2000000 VideoStreaming Interface Descriptor: bLength 46 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 2 bmCapabilities 0x00 Still image unsupported wWidth 352 wHeight 288 dwMinBitRate 202752 dwMaxBitRate 6082560 dwMaxVideoFrameBufferSize 202752 dwDefaultFrameInterval 333333 bFrameIntervalType 5 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 500000 dwFrameInterval( 2) 666666 dwFrameInterval( 3) 1000000 dwFrameInterval( 4) 2000000 VideoStreaming Interface Descriptor: bLength 46 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 3 bmCapabilities 0x00 Still image unsupported wWidth 320 wHeight 240 dwMinBitRate 153600 dwMaxBitRate 4608000 dwMaxVideoFrameBufferSize 153600 dwDefaultFrameInterval 333333 bFrameIntervalType 5 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 500000 dwFrameInterval( 2) 666666 dwFrameInterval( 3) 1000000 dwFrameInterval( 4) 2000000 VideoStreaming Interface Descriptor: bLength 46 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 4 bmCapabilities 0x00 Still image unsupported wWidth 176 wHeight 144 dwMinBitRate 50688 dwMaxBitRate 1520640 dwMaxVideoFrameBufferSize 50688 dwDefaultFrameInterval 333333 bFrameIntervalType 5 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 500000 dwFrameInterval( 2) 666666 dwFrameInterval( 3) 1000000 dwFrameInterval( 4) 2000000 VideoStreaming Interface Descriptor: bLength 46 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 5 bmCapabilities 0x00 Still image unsupported wWidth 160 wHeight 120 dwMinBitRate 38400 dwMaxBitRate 1152000 dwMaxVideoFrameBufferSize 38400 dwDefaultFrameInterval 333333 bFrameIntervalType 5 dwFrameInterval( 0) 333333 dwFrameInterval( 1) 500000 dwFrameInterval( 2) 666666 dwFrameInterval( 3) 1000000 dwFrameInterval( 4) 2000000 VideoStreaming Interface Descriptor: bLength 34 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 6 bmCapabilities 0x00 Still image unsupported wWidth 1280 wHeight 800 dwMinBitRate 2048000 dwMaxBitRate 18432000 dwMaxVideoFrameBufferSize 2048000 dwDefaultFrameInterval 1333333 bFrameIntervalType 2 dwFrameInterval( 0) 1333333 dwFrameInterval( 1) 2000000 VideoStreaming Interface Descriptor: bLength 34 bDescriptorType 36 bDescriptorSubtype 5 (FRAME_UNCOMPRESSED) bFrameIndex 7 bmCapabilities 0x00 Still image unsupported wWidth 1280 wHeight 1024 dwMinBitRate 2621440 dwMaxBitRate 23592960 dwMaxVideoFrameBufferSize 2621440 dwDefaultFrameInterval 1333333 bFrameIntervalType 2 dwFrameInterval( 0) 1333333 dwFrameInterval( 1) 2000000 VideoStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 13 (COLORFORMAT) bColorPrimaries 1 (BT.709,sRGB) bTransferCharacteristics 1 (BT.709) bMatrixCoefficients 4 (SMPTE 170M (BT.601)) Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0080 1x 128 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 2 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0100 1x 256 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 3 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0320 1x 800 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 4 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0b20 2x 800 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 5 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x1320 3x 800 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 6 bNumEndpoints 1 bInterfaceClass 14 Video bInterfaceSubClass 2 Video Streaming bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x13e8 3x 1000 bytes bInterval 1 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 ? bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0000 (Bus Powered) Bus 006 Device 002: ID 04d9:1503 Holtek Semiconductor, Inc. Shortboard Lefty Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x04d9 Holtek Semiconductor, Inc. idProduct 0x1503 Shortboard Lefty bcdDevice 3.10 iManufacturer 1 iProduct 2 USB Keyboard iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 59 bNumInterfaces 2 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 1 Boot Interface Subclass bInterfaceProtocol 1 Keyboard iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 62 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 10 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0 None iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 101 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 10 Device Status: 0x0000 (Bus Powered)

    Read the article

  • Code jumps out of a jar and runs? What is causing this?

    - by Mike
    I am trying to get a sample program working with JUNG, a graphing tool in Java. I downloaded and referenced all the .jar files in eclipse so my project hierarchy looks like this: In Test.java I have the following code: public class Test { static public void main() { System.out.print("Hello"); }} For some reason though when I try to run it as a Java Application by right clicking on Jung test in the project hierarchy I am presented with a bunch of classes. My Test.java isn't on the list so if I just leave it as ** and press ok it starts running a program that is dynamically adding nodes and vertexes to a graph. I can't seem to figure out what code its actually executing. I know java but stuff like this with the jar files seems to be getting lost on me. Any ideas? Thanks

    Read the article

  • Community Megaphone Podcast

    - by Steve Michelotti
    Last week I had the pleasure of being a guest on the Community Megaphone Podcast with Andrew Duthie and Dane Morgridge. We discussed .NET 4, C# 4, MVC 2, “geek religious wars”, and of course community. You can check out Show #5 here or directly download it. Thanks to Dane and Andrew for having me on the show!

    Read the article

  • Multiple monitors with MAC latop/PC: how to switch output?

    - by Dane Jung
    I have two monitors, a PC that uses both of them, and a MAC laptop. The dilemma in my mind is how to keep the two monitor state in the PC active, while still being able to switch one monitor to the laptop's output. Is this even possible? I figure as soon as output is switched, my PC will detect a monitor has been unplugged, and will switch to a one-monitor state. The ideal would be to have a switch that switches from the PC two monitor output state to one where one monitor is being used by the MAC. Thanks for any help, Dane

    Read the article

  • Casting interfaces in java

    - by owca
    I had two separate interfaces, one 'MultiLingual' for choosing language of text to return, and second 'Justification' to justify returned text. Now I need to join them, but I'm stuck at 'java.lang.ClassCastException' error. Class Book is not important here. Data.length and FormattedInt.width correspond to the width of the line. The code : public interface MultiLingual { static int ENG = 0; static int PL = 1; String get(int lang); int setLength(int length); } class Book implements MultiLingual { private String title; private String publisher; private String author; private int jezyk; public Book(String t, String a, String p, int y){ this(t, a, p, y, 1); } public Book(String t, String a, String p, int y, int lang){ title = t; author = a; publisher = p; jezyk = lang; } public String get(int lang){ jezyk = lang; return this.toString(); } public int setLength(int i){ return 0; } @Override public String toString(){ String dane; if (jezyk == ENG){ dane = "Author: "+this.author+"\n"+ "Title: "+this.title+"\n"+ "Publisher: "+this.publisher+"\n"; } else { dane = "Autor: "+this.author+"\n"+ "Tytul: "+this.title+"\n"+ "Wydawca: "+this.publisher+"\n"; } return dane; } } class Data implements MultiLingual { private int day; private int month; private int year; private int jezyk; private int length; public Data(int d, int m, int y){ this(d, m, y, 1); } public Data(int d, int m, int y, int lang){ day = d; month = m; year = y; jezyk = lang; } public String get(int lang){ jezyk = lang; return this.toString(); } public int setLength(int i){ length = i; return length; } @Override public String toString(){ String dane=""; String miesiac=""; String dzien=""; switch(month){ case 1: miesiac="January"; case 2: miesiac="February"; case 3: miesiac="March"; case 4: miesiac="April"; case 5: miesiac="May"; case 6: miesiac="June"; case 7: miesiac="July"; case 8: miesiac="August"; case 9: miesiac="September"; case 10: miesiac="October"; case 11: miesiac="November"; case 12: miesiac="December"; } if(day==1){ dzien="st"; } if(day==2 || day==22){ dzien="nd"; } if(day==3 || day==23){ dzien="rd"; } else{ dzien="th"; } if(jezyk==ENG){ dane =this.day+dzien+" of "+miesiac+" "+this.year; } else{ dane = this.day+"."+this.month+"."+this.year; } return dane; } } interface Justification { static int RIGHT=1; static int LEFT=2; static int CENTER=3; String justify(int just); } class FormattedInt implements Justification { private int liczba; private int width; private int wyrownanie; public FormattedInt(int s, int i){ liczba = s; width = i; wyrownanie = 2; } public String justify(int just){ wyrownanie = just; String wynik=""; String tekst = Integer.toString(liczba); int len = tekst.length(); int space_left=width - len; int space_right = space_left; int space_center_left = (width - len)/2; int space_center_right = width - len - space_center_left -1; String puste=""; if(wyrownanie == LEFT){ for(int i=0; i<space_right; i++){ puste = puste + " "; } wynik = tekst+puste; } else if(wyrownanie == RIGHT){ for(int i=0; i<space_left; i++){ puste = puste + " "; } wynik = puste+tekst; } else if(wyrownanie == CENTER){ for(int i=0; i<space_center_left; i++){ puste = puste + " "; } wynik = puste + tekst; puste = " "; for(int i=0; i< space_center_right; i++){ puste = puste + " "; } wynik = wynik + puste; } return wynik; } } And the test code that shows this casting "(Justification)gatecrasher[1]" which gives me errors : MultiLingual gatecrasher[]={ new Data(3,12,1998), new Data(10,6,1924,MultiLingual.ENG), new Book("Sekret","Rhonda Byrne", "Nowa proza",2007), new Book("Tuesdays with Morrie", "Mitch Albom", "Time Warner Books",2003, MultiLingual.ENG), }; gatecrasher[0].setLength(25); gatecrasher[1].setLength(25); Justification[] t={ new FormattedInt(345,25), (Justification)gatecrasher[1], (Justification)gatecrasher[0], new FormattedInt(-7,25) }; System.out.println(" 10 20 30"); System.out.println("123456789 123456789 123456789"); for(int i=0;i < t.length;i++) System.out.println(t[i].justify(Justification.RIGHT)+"<----\n");

    Read the article

  • Frederick .NET User Group April 2010 Meeting

    - by John Blumenauer
    FredNUG is pleased to announce that we have an excellent speaker lined up for April.  On April 20th, we’ll start with pizza and social networking at 6:30 PM.  Then, starting at 7 PM, Dane Morgridge will present “Getting Started with Entity Framework 4” The scheduled agenda is:   6:30 PM - 7:00 PM - Pizza/Social Networking/Announcements 7:00 PM - 8:30 PM - Main Topic: Getting Started with Entity Framework 4 with Dane Morgridge  Main Topic Description:  Getting Started with Entity Framework 4 With .Net 3.5 Microsoft release Linq to Sql and with .Net 3.5 SP1 came the Entity Framework, both powerful ORM tools leveraging Linq technology.   Entity Framework v1, while usable, was definitely lacking some important features and the Entity Framework team delivered with version 4 coming with Visual Studio 2010.  In this session we will look at Entity Framework 4 from the ground level and you will get a solid understanding of it basic principles.  We will also go through all of the new features in Entity Framework 4 and see how far it’s come since the initial release.  If you’ve never taken a look at Entity Framework, now is the time as version 4 is the real deal. Speaker Bio: Dane Morgridge has been a developer for 9+ years and has worked with .Net & C# since the first public beta. His current passions are Entity Framework, WPF, WCF, Silverlight and LINQ. He works mostly with C#, but is also a big fan of whatever new technology he happens to come across. In addition to software development, he is the host of the Community Megaphone Podcast and also enjoys dabbling in graphic design, video special effects and hockey. When not with his family he is usually learning some new technology or working on some side projects. He is currently working as the Development Manager & Architect at Roska Direct in Montgomeryville, PA.  He can be reached through is blog http://geekswithblogs.net/danemorgridge or on Twitter @danemorgridge.  8:30 PM - 8:45 PM – RAFFLE! Please join us and get involved in our .NET developers community!

    Read the article

  • GetContactList stops reporting collisions on welded bodies

    - by Henrique Jung
    I have some strange problem with my game which uses Box2D as physics engine and I'm out of ideas on what I can do to solve it. My game is a class assignment where I need to build a simple game where the main character moves in a 2D environment while square blocks comes from below him. Each time a collision occurs, that block is attached to the character using a weld joint, when three blocks of the same colors are together, they annihilate themselves(an effect similar to Bejeweled). I'm using a recursive function to iterate through all the attached blocks of a given block to see if there are enough blocks for them to be deleted. I'm using GetContactList function to iterate through the list of contacts to see which blocks are adjacent to each other. The results are quite disappointing, the blocks only get annihilated in few cases. After a lot of debugging, I found the issue, but I still don't know how to solve. My issue is: after some time, GetContactList STOPS returning contacts (return NULL) to blocks that were already attached for some time. I spent some time reading the Box2D manual as well as some tutorials and still didn't find any clue of what is happening. Below there's some simplified version of the code that I wrote. for(int a = 0; a < blocksList.size(); a++) { blocksList[a].BuildConnections(); } And on BuildConnections b2ContactEdge* edge = body->GetContactList(); while(edge != NULL) { if (long_check_to_see_if_there's_a_block_nearby) { // add itself to the list to be anihilated globalList.push_back(this); //if there's, call BuildConnections again on the adjacent block adjacentBody->GetUserData()->BuildConnections; } edge = edge->next; } I know that there's another issue related to circular inclusions, but I fairly sure that this problem isn't causing the problem with the collisions. You can download my entire code from this page if you'd like http://code.google.com/p/fellz/source/list

    Read the article

  • slow speed transfering files to a local network device

    - by F. Ariel Jung
    I'm having troubles copying files from my pc(ubuntu 13.04 64 bits) to a Media Center(WDTV Live: with an SATA2 HDD attached) through the local network. the speed is to slow, it's up to 2.0 MB/s image: http://s11.postimg.org/g1nuai92b/Captura_de_pantalla_de_2013_06_24_07_46_55.png (I don't use image tag because it is a big image) my PC has a wifi network card Tp Link TL-WN951N and it is connected to a TP Link TL-WDR3500 router via wifi, and the WDTV Live is connected via LAN here is a iwconfig: eth0 no wireless extensions. lo no wireless extensions. wlan0 IEEE 802.11bgn ESSID:"TL-WDR3500" Mode:Managed Frequency:2.462 GHz Access Point: A0:F3:C1:6C:3B:F1 Bit Rate=39 Mb/s Tx-Power=20 dBm Retry long limit:7 RTS thr:off Fragment thr:off Power Management:off Link Quality=62/70 Signal level=-48 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:33521 Invalid misc:2245290 Missed beacon:0 if more data is required I'll post it as needed. I can't figure this out, needed help. please

    Read the article

  • Community Megaphone Podcast #5 with Steve Michelotti

    - by Dane Morgridge
    Show 5 is finally up with special guest Steve Michelotti.  We talked about ASP.Net MVC, how to get started in the community and more! Steve Michelotti is a Microsoft ASP.NET MVP and an Architect/Developer for Applied Information Sciences (AIS). He has consulted at Advertising.com/AOL where he was the Tech Lead for one of the highest volume .NET applications in the world. He previously was the Chief Technologist at e.magination. Steve is a frequent presenter at developer user groups and Code Camps along the East Coast and holds the MCSD, MCPD, and MCT certifications. Steve has been on Microsoft Channel9 and his published articles include Visual Studio Magazine and his blog: www.geekswithblogs.net/michelotti. Audio: http://www.communitymegaphonepodcast.com/Content/Audio/Show-5-Steve-Michelotti.mp3 Show Url: http://www.communitymegaphonepodcast.com/Show/5/Steve-Michelotti Rss: http://feed.communitymegaphonepodcast.com/cm-podcast

    Read the article

  • 2010 April Fools Joke

    - by Dane Morgridge
    I started at my current job at the end of March last year and there were some pretty funny April fools jokes.  Nothing super crazy, but pretty funny.  One guy came in and there was a tree in his cube.  We (me and the rest of my team) were planning for a couple of weeks on what we could do that would be just awesome.  We had a lot of really good ideas but nothing was spectacular.  Then Steve Andrews had a brilliant idea (yes it's true).  Since we have internal DNS servers we could redirect DNS to our internal servers for a site such as cnn.com.  Then we would lift the code from the site and create our own home page that would contain news about people in the company.  Steve was actually laughing so hard when he thought of the idea that it took him almost 30 minutes to spit it out. I thought, "this is perfect". I had enlisted a couple of people to help come up with the stories and at the same time we were trying to figure out how to get everybody to the site the morning of the 1st.  Then it hit me.  We could have the main article be one of my getting picked up by the FBI on hacking charges.  Then Chris (my boss) could send an email out telling everyone that I would not be there today and direct them to the site.  That would for sure get everyone to go to cnn.com first thing and see our prank.  I begun the process of looking for photos I could crop myself into and found the perfect one.  Then my wife took a good pic with our Canon 40D and I went to work.  The night before I didn't have any other stories due to everyone being really busy at work, but I decided to go ahead with just the FBI bust on it's own.  I got everything working and tested and coordinated with Chris for me to come in late so no one would see me at the office until after everyone had seen the joke. And so the morning of April fools came and I was waiting at home and the email was perfect.  Chris told everyone that I wouldn't be in and that not to answer any questions if you got any calls from anybody.  The Photoshop job I did was not perfect, but good enough and I even wrote an article with it that went into more detail about how I had been classified as a terrorist and all kinds of stuff. People at work started getting the emails and a few people didn't realize it was a joke (as I had hoped), including some from senior management (one person in particular who shall remain nameless in this post).  Emails started flying around about how to contain the situation and how to handle bad PR.  He basically bought it hook, line and sinker and then went in to crisis mode.  It was awesome! He did finally realize it was a joke and I will likely print and frame the email he sent out.  In short, April fools this year was a huge success.

    Read the article

  • New Web Comic: Code Monkey Kung Fu

    - by Dane Morgridge
    It’s been something I’ve wanted to do for quite some time and decided it was finally time. Yesterday, I launched a new web comic “Code Monkey Kung Fu”. After being a programer for more than ten years, I’ve come across quite a few hilarious situations and will be drawing on them for inspiration. I also have a four kids, so they will probably produce a lot as well. My plan is to release on Tuesdays with additional comics mixed in on occasion. I hope you enjoy! http://www.codemonkeykungfu.com

    Read the article

  • Customize Entity Framework SSDL &amp; SQL Generation

    - by Dane Morgridge
    In almost every talk I have done on Entity Framework I get questions on how to do custom SSDL or SQL when using model first development.  Quite a few of these questions have required custom changes to the SSDL, which of course can be a problem if it is getting auto generated.  Luckily, there is a tool that can help.  In the Visual Studio Gallery on MSDN, there is the Entity Designer Database Generation Power Pack. You have the ability to select different generation strategies and it also allows you to inject custom T4 Templates into the generation workflow so that you can customize the SSDL and SQL generation.  When you select to generate a database from a model the dialog is replaced by one with more options:   You can clone the individual workflow for either the current project or current machine.  The templates are installed at “C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\DBGen” on my local machine and you can make a copy of any template there.  If you clone the strategy and open it up, you will get the following workflow: Each item in the sequence is defining the execution of a T4 template.  The XAML for the workflow is listed below so you can see where the T4 files are defined.  You can simply make a copy of an existing template and make what ever changes you need.   1: <Activity x:Class="GenerateDatabaseScriptWorkflow" ... > 2: <x:Members> 3: <x:Property Name="Csdl" Type="InArgument(sde:EdmItemCollection)" /> 4: <x:Property Name="ExistingSsdl" Type="InArgument(s:String)" /> 5: <x:Property Name="ExistingMsl" Type="InArgument(s:String)" /> 6: <x:Property Name="Ssdl" Type="OutArgument(s:String)" /> 7: <x:Property Name="Msl" Type="OutArgument(s:String)" /> 8: <x:Property Name="Ddl" Type="OutArgument(s:String)" /> 9: <x:Property Name="SmoSsdl" Type="OutArgument(ss:SsdlServer)" /> 10: </x:Members> 11: <Sequence> 12: <dbtk:ProgressBarStartActivity /> 13: <dbtk:CsdlToSsdlTemplateActivity SsdlOutput="[Ssdl]" TemplatePath="$(VSEFTools)\DBGen\CSDLToSSDL_TPT.tt" /> 14: <dbtk:CsdlToMslTemplateActivity MslOutput="[Msl]" TemplatePath="$(VSEFTools)\DBGen\CSDLToMSL_TPT.tt" /> 15: <ded:SsdlToDdlActivity ExistingSsdlInput="[ExistingSsdl]" SsdlInput="[Ssdl]" DdlOutput="[Ddl]" /> 16: <dbtk:GenerateAlterSqlActivity DdlInputOutput="[Ddl]" DeployToScript="True" DeployToDatabase="False" /> 17: <dbtk:ProgressBarEndActivity ClosePopup="true" /> 18: </Sequence> 19: </Activity>   So as you can see, this tool enables you to make some pretty heavy customizations to how the SSDL and SQL get generated.  You can get more info and the tool can be downloaded from: http://visualstudiogallery.msdn.microsoft.com/en-us/df3541c3-d833-4b65-b942-989e7ec74c87.  There is a comments section on the site so make sure you let the team know what you like and what you don’t like.  Enjoy!

    Read the article

  • Sqlite &amp; Entity Framework 4

    - by Dane Morgridge
    I have been working on a few client app projects in my spare time that need to persist small amounts of data and have been looking for an easy to use embedded database.  I really like db4o but I'm not wanting to open source this particular project so it was not an option.  Then I remembered that there was an ADO.NET provider for sqlite.  Being a fan of sqlite in general, I downloaded it and gave it an install.  The installer added tooling support for both Visual Studio 2008 & 2010 which is nice because I am working almost exclusively in 2010 at the moment.  I noticed that the provider also had support for Entity Framework, but not specifically v4.  I created a database using the tools that get installed with Visual Studio and all seemed to work fine.  I went on to create an Entity Framework context and selected the sqlite database and to my surprise it worked with out any problems.  The model showed up just like it would for any database and so I started to write a little code to test and then.. BAM!.. Exception. "Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information." A quick bit of searching on Bing found the answer.  To get it working, you need to include the following code in your web.config file: 1: <startup useLegacyV2RuntimeActivationPolicy="true"> 2: <supportedRuntime version="v4.0" /> 3: </startup> And then everything magically works.  Entity Framework 4 features worked, like lazy loading and even the POCO templates worked.  The only thing that didn't work was the model first development.  The SQL generated was for SQL Server and of course wouldn't run on sqlite without some modifications. The only other oddity I found was that in order to have an auto incrementing id, you have to use the full integer data type for sqlite; a regular int won't do the trick.  This translates to an Int64, or a long when working with it in Entity Framework.  Not a big deal, but something you need to be aware of. All in all, I am quite impressed with the Entity Framework support I found with sqlite.  I wasn't really expecting much at all, and I was pleasantly surprised. I downloaded the ADO.NET sqlite provider from http://sqlite.phxsoftware.com/.  If you want to use an embedded database with Entity Framework, give it a look.  It will be well worth your time.

    Read the article

  • Entity Framework 4, WCF &amp; Lazy Loading Tip

    - by Dane Morgridge
    If you are doing any work with Entity Framework and custom WCF services in EFv1, everything works great.  As soon as you jump to EFv4, you may find yourself getting odd errors that you can’t seem to catch.  The problem is almost always has something to do with the new lazy loading feature in Entity Framework 4.  With Entity Framework 1, you didn’t have lazy loading so this problem didn’t surface.  Assume I have a Person entity and an Address entity where there is a one-to-many relationship between Person and Address (Person has many Addresses). In Entity Framework 1 (or in EFv4 with lazy loading turned off), I would have to load the Address data by hand by either using the Include or Load Method: var people = context.People.Include("Addresses"); or people.Addresses.Load(); Lazy loading works when the first time the Person.Addresses collection is accessed: 1: var people = context.People.ToList(); 2:  3: // only person data is currently in memory 4:  5: foreach(var person in people) 6: { 7: // EF determines that no Address data has been loaded and lazy loads 8: int count = person.Addresses.Count(); 9: } 10:  Lazy loading has the useful (and sometimes not useful) feature of fetching data when requested.  It can make your life easier or it can make it a big pain.  So what does this have to do with WCF?  One word: Serialization. When you need to pass data over the wire with WCF, the data contract is serialized into either XML or binary depending on the binding you are using.  Well, if I am using lazy loading, the Person entity gets serialized and during that process, the Addresses collection is accessed.  When that happens, the Address data is lazy loaded.  Then the Address is serialized, and the Person property is accessed, and then also serialized and then the Addresses collection is accessed.  Now the second time through, lazy loading doesn’t kick in, but you can see the infinite loop caused by this process.  This is a problem with any serialization, but I personally found it trying to use WCF. The fix for this is to simply turn off lazy Loading.  This can be done at each call by using context options: context.ContextOptions.LazyLoadingEnabled = false; Turning lazy loading off will now allow your classes to be serialized properly.  Note, this is if you are using the standard Entity Framework classes.  If you are using POCO,  you will have to do something slightly different.  With POCO, the Entity Framework will create proxy classes by default that allow things like lazy loading to work with POCO.  This proxy basically creates a proxy object that is a full Entity Framework object that sits between the context and the POCO object.  When using POCO with WCF (or any serialization) just turning off lazy loading doesn’t cut it.  You have to turn off the proxy creation to ensure that your classes will serialize properly: context.ContextOptions.ProxyCreationEnabled = false; The nice thing is that you can do this on a call-by-call basis.  If you use a new context for each set of operations (which you should) then you can turn either lazy loading or proxy creation on and off as needed.

    Read the article

  • Why do browsers leak memory?

    - by Dane Balia
    A colleague and I were speaking about browsers (using a browser control object in a project), and it appears as plain as day that all browsers (Firefox, Chrome, IE, Opera) display the same characteristic or side-effect from their usage and that being 'Leaking Memory'. Can someone explain why that is the case? Surely as with any form of code, there should be proper garbage collection? PS. I've read about some defensive patterns on why this can happen from a developer's perspective. I am aware of an article Crockford wrote on IE; but why is the problem symptomatic of every browser? Thanks

    Read the article

  • Microsoft MVP Award &ndash; Data Platform Development

    - by Dane Morgridge
    For those who don't already know, yesterday I received my first Microsoft MVP Award in Data Platform Development.  With less than 5,000 MVPs in the world overall and about 20 in the Data Platform category, saying I am honored would be an understatement.  From the first time I spoke at a code camp, I was totally hooked and have had a blast travelling around the east coast speaking at code camps and users groups.  I'd like to take the time to thank Dani Diaz (@danidiaz) for the nomination and everyone who supported me, especially my wife Lisa for letting me travel and speak as much as I have and putting up with me for late nights and such.  Roska Digital, my employer, also deserves a shout out for supporting me and giving me the necessary time off to get to speaking engagements.  With any luck, the next year will be at least as fun if not more than the last one has.  I hope to see you at a code camp or user group meeting soon! I would also like to send a congratulations to the other new Philly Area MVPs: John Angelini (@johnangelini) & Ned Ames (@nedames) You can find out more about the Microsoft MVP Award at https://mvp.support.microsoft.com/

    Read the article

  • EF4 CPT5 Code First Remove Cascading Deletes

    - by Dane Morgridge
    I have been using EF4 CTP5 with code first and I really like the new code.  One issue I was having however, was cascading deletes is on by default.  This may come as a surprise as using Entity Framework with anything but code first, this is not the case.  I ran into an exception with some one-to-many relationships I had: Introducing FOREIGN KEY constraint 'ProjectAuthorization_UserProfile' on table 'ProjectAuthorizations' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints. Could not create constraint. See previous errors. To get around this, you can use the fluent API and put some code in the OnModelCreating: 1: protected override void OnModelCreating(System.Data.Entity.ModelConfiguration.ModelBuilder modelBuilder) 2: { 3: modelBuilder.Entity<UserProfile>() 4: .HasMany(u => u.ProjectAuthorizations) 5: .WithRequired(a => a.UserProfile) 6: .WillCascadeOnDelete(false); 7: } This will work to remove the cascading delete, but I have to use the fluent API and it has to be done for every one-to-many relationship that causes the problem. I am personally not a fan of cascading deletes in general (for several reasons) and I’m not a huge fan of fluent APIs.  However, there is a way to do this without using the fluent API.  You can in the OnModelCreating, remove the convention that creates the cascading deletes altogether. 1: protected override void OnModelCreating(System.Data.Entity.ModelConfiguration.ModelBuilder modelBuilder) 2: { 3: modelBuilder.Conventions.Remove<OneToManyCascadeDeleteConvention>(); 4: } Thanks to Jeff Derstadt from Microsoft for the info on removing the convention all together.  There is a way to build a custom attribute to remove it on a case by case basis and I’ll have a post on how to do this in the near future.

    Read the article

  • EF4 Code First Control Unicode and Decimal Precision, Scale with Attributes

    - by Dane Morgridge
    There are several attributes available when using code first with the Entity Framework 4 CTP5 Code First option.  When working with strings you can use [MaxLength(length)] to control the length and [Required] will work on all properties.  But there are a few things missing. By default all string will be created using unicode so you will get nvarchar instead of varchar.  You can change this using the fluent API or you can create an attribute to make the change.  If you have a lot of properties, the attribute will be much easier and require less code. You will need to add two classes to your project to create the attribute itself: 1: public class UnicodeAttribute : Attribute 2: { 3: bool _isUnicode; 4:  5: public UnicodeAttribute(bool isUnicode) 6: { 7: _isUnicode = isUnicode; 8: } 9:  10: public bool IsUnicode { get { return _isUnicode; } } 11: } 12:  13: public class UnicodeAttributeConvention : AttributeConfigurationConvention<PropertyInfo, StringPropertyConfiguration, UnicodeAttribute> 14: { 15: public override void Apply(PropertyInfo memberInfo, StringPropertyConfiguration configuration, UnicodeAttribute attribute) 16: { 17: configuration.IsUnicode = attribute.IsUnicode; 18: } 19: } The UnicodeAttribue class gives you a [Unicode] attribute that you can use on your properties and the UnicodeAttributeConvention will tell EF how to handle the attribute. You will need to add a line to the OnModelCreating method inside your context for EF to recognize the attribute: 1: protected override void OnModelCreating(System.Data.Entity.ModelConfiguration.ModelBuilder modelBuilder) 2: { 3: modelBuilder.Conventions.Add(new UnicodeAttributeConvention()); 4: base.OnModelCreating(modelBuilder); 5: } Once you have this done, you can use the attribute in your classes to make sure that you get database types of varchar instead of nvarchar: 1: [Unicode(false)] 2: public string Name { get; set; }   Another option that is missing is the ability to set the precision and scale on a decimal.  By default decimals get created as (18,0).  If you need decimals to be something like (9,2) then you can once again use the fluent API or create a custom attribute.  As with the unicode attribute, you will need to add two classes to your project: 1: public class DecimalPrecisionAttribute : Attribute 2: { 3: int _precision; 4: private int _scale; 5:  6: public DecimalPrecisionAttribute(int precision, int scale) 7: { 8: _precision = precision; 9: _scale = scale; 10: } 11:  12: public int Precision { get { return _precision; } } 13: public int Scale { get { return _scale; } } 14: } 15:  16: public class DecimalPrecisionAttributeConvention : AttributeConfigurationConvention<PropertyInfo, DecimalPropertyConfiguration, DecimalPrecisionAttribute> 17: { 18: public override void Apply(PropertyInfo memberInfo, DecimalPropertyConfiguration configuration, DecimalPrecisionAttribute attribute) 19: { 20: configuration.Precision = Convert.ToByte(attribute.Precision); 21: configuration.Scale = Convert.ToByte(attribute.Scale); 22:  23: } 24: } Add your line to the OnModelCreating: 1: protected override void OnModelCreating(System.Data.Entity.ModelConfiguration.ModelBuilder modelBuilder) 2: { 3: modelBuilder.Conventions.Add(new UnicodeAttributeConvention()); 4: modelBuilder.Conventions.Add(new DecimalPrecisionAttributeConvention()); 5: base.OnModelCreating(modelBuilder); 6: } Now you can use the following on your properties: 1: [DecimalPrecision(9,2)] 2: public decimal Cost { get; set; } Both these options use the same concepts so if there are other attributes that you want to use, you can create them quite simply.  The key to it all is the PropertyConfiguration classes.   If there is a class for the datatype, then you should be able to write an attribute to set almost everything you need.  You could also create a single attribute to encapsulate all of the possible string combinations instead of having multiple attributes on each property. All in all, I am loving code first and having attributes to control database generation instead of using the fluent API is huge and saves me a great deal of time.

    Read the article

  • Community Branching

    - by Dane Morgridge
    As some may have noticed, I have taken a liking to Ruby (and Rails in particular) quite a bit recently. This last weekend I spoke at the NYC Code Camp on a comparison of ASP.NET and Rails as well as an intro to Entity Framework talk.  I am speaking at RubyNation in April and have submitted to other ruby conferences around the area and I am also doing a Rails and MongoDB talk at the Philly Code Camp in April. Before you start to think this is my "I'm leaving .NET post", which it isn't so I need to clarify. I am not, nor do I intend to any time in the near future plan on abandoning .NET.  I am simply branching out into another community based on a development technology that I very much enjoy.  If you look at my twitter bio, you will see that I am into Entity Framework, Ruby on Rails, C++ and ASP.NET MVC, and not necessarily in that order.  I know you're probably thinking to your self that I am crazy, which is probably true on several levels (especially the C++ part). I was actually crazy enough at the NYC Code Camp to show up wearing a Linux t-shirt, presenting with my MacBook Pro on Entity Framework, ASP.NET MVC and Rails. (I did get pelted in the head with candy by Rachel Appel for it though) At all of the code camps I am submitting to this year, i will be submitting sessions on likely all four topics, and some sessions will be a combination of 2 or more.  For example, my "ASP.NET MVC: A Gateway To Rails?" talk touches ASP.NET MVC, Entity Framework Code First and Rails. Simply put (and I talk about this in my MVC & Rails talk) is that learning and using Rails has made me a better ASP.NET MVC developer. Just one example of this is helper methods.  When I started working with ASP.NET MVC, I didn't really want to use helpers and preferred to just use standard html tags, especially where links were concerned.  It was just me being stubborn and not really seeing all of the benefit of the helpers.  To my defense, coming from WebForms, I wanted to be as bare metal as possible and it seemed at first like a lot of the helpers were an unnecessary abstraction. I took my first look at Rails back in v1 and didn't spend very much time with it so I dismissed it and went on my merry ASP.NET WebForms way.  Then I picked up ASP.NET MVC and grasped the MVC pattern itself much better. After this, I took another look at Rails and everything made sense.  I decided then to learn Rails. (I think it is important for developers to learn new languages and platforms regularly so it was a natural progression for me) I wanted to learn it the right way, so when I dug into code, everyone used helpers everywhere for pretty much everything possible. I took some time to dig in and found out how helpful they were and subsequently realized how awesome they were in ASP.NET MVC also and started using them. In short, I love Rails (and Ruby in general).  I also love ASP.NET MVC and Entity Framework and yes I still love C++.  I have varying degrees of love for them individually at any given moment and it is likely to shift based on the current project I am working on.  I know you're thinking it so before you ask the question. "Which do I use when?", I'm going to give the standard developer answer of: It depends.  There are a lot of factors that I am not going to even go into that would go into a decision.  The most basic question I would ask though is,  does this project depend on .NET?  If it does, then I'd say that ASP.NET MVC is probably going to be the more logical choice and I am going to leave it at that.  I am working on projects right now in both technologies and I don't see that changing anytime soon (one project even uses both). With all that being said, you'll find me at code camps, conferences and user groups presenting on .NET, Ruby or both, writing about .NET and Ruby and I will likely be blogging on both in the future.  I know of others that have successfully branched out to other communities and with any luck I'll be successful at it too. On a (sorta) side note, I read a post by Justin Etheredge the other day that pretty much sums up my feelings about Ruby as a language.  I highly recommend checking it out: What Is So Great About Ruby?

    Read the article

1 2 3 4  | Next Page >