Search Results

Search found 2109 results on 85 pages for 'jj jason'.

Page 3/85 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • why it throws java.lang.classCastException

    - by matin1234
    Hi this is my class and I want to sort my stack but it will throw an exception please help me thanks! public class jj { public static void main(String[] args){ Stack<Integer> s = new ImplimentingAStackUsingAnArrayOfAGivenSizeN(5); s.push(1); s.push(3); s.push(5); s.push(2); s.push(4); Collections.sort((List<Integer>) (s)); System.out.println(s); while (!s.isEmpty()) { System.out.println(s.pop()); } } } the stack traces: run: Exception in thread "main" java.lang.ClassCastException: datastructurechapter5.ImplimentingAStackUsingAnArrayOfAGivenSizeN cannot be cast to java.util.List at datastructurechapter5.jj.main(jj.java:24) `Collections.sort((List<Integer>) (s));` Java Result: 1 BUILD SUCCESSFUL (total time: 2 seconds)

    Read the article

  • Convert Your Car’s Ashtray to a Smartphone Dock

    - by Jason Fitzpatrick
    Envious of modern cars that have built-in iPhone chargers and the like? Be jealous no more; this simple DIY tutorial guides you through converting the ashtray in your older ride into a smartphone dock. Thanks to the work of Jason Torchinsky over at Jalopnik, you’ll have no trouble upgrading that ashtray (or any other small pull out compartment) into a dock for your smartphone or MP3 player. Although the car they use is from the 1970s, most cars built even in the last 10 years still have an ashtray or ashtray-like compartment you could use to follow along. Hit up the link below to read more about the project. How To Turn Your Cars Ashtray Into A Smartphone Dock [Jalopnik] HTG Explains: Is ReadyBoost Worth Using? HTG Explains: What The Windows Event Viewer Is and How You Can Use It HTG Explains: How Windows Uses The Task Scheduler for System Tasks

    Read the article

  • Projecting onto different size screens by cropping

    - by Jason
    Hi, I am building a phone application which will display a shape on screen. The shape should look the same on different screen sizes. I. Decided the best way to do this is to show more of the background on larger screen keeping the shapes proportion the same on all screens. My problem is I am not sure how to achieve this, I can query the screen size at runtime and calculate how different it is from the six is designed for but I am not sure what to do with this value. What kind of projection should I use for my orthographic matrix an hour will I display more on larger screens and not loose information on smaller screens? Thanks, Jason.

    Read the article

  • I can not download anything

    - by Jason Machen
    I am very new to ubuntu but decided to wipe my windows 7 and install it. I can not download anything from the software center. This is the error message I get. I can use the web in all other ways including this site. What can I do? Thanks, Jason W:Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/main/source/Sources 404 Not Found [IP: 91.189.91.13 80] W:Failed to fetch http://security.ubuntu.com/ubuntu/dists/raring-security/restricted Plus about 20 other lines.

    Read the article

  • PHP MYSQL FPDF retrieving pdf string stored as blob.

    - by jj.amonit
    Using the above technologies, I want to create a PDF, store it in my db, and email it. All with the click of one button. I also want to call it up and have it be able to display with a hyperlink. I am very new to FPDF. Therefore, I am trying to start off very slowly. I began with this link stackoverflow Q I put both parts of his code into the same page and tried with separate pages. I made the suggested changes/additions and even did a line by line comparison. I still get the message, "format error: not a PDF or corrupted" If I just $pdf-Output(); I get the pdf to display. It's either the way the string is being Output, or it's the header() function. It's not the storage method, unless my column setup is incorrect. BUt a blob is a blob, right? If you want, I can upload the sanitized code. Just let me know what would help answer this. Thanks JJ

    Read the article

  • Rails Custom Plugin/Gem with Partials

    - by Jason
    I am writing a gem which provides helpers for views. The HTML I want to insert via the helper is complex enough that I'd rather write it in a _partial.html.erb file. How do I get the gem's view path include in the application's load_path? Note: the only gem I've found that does something like this is Devise. When a view cannot be found, Rails prints the load path which (on my machine) looks like: Missing partial sortable_nested_set/tree with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml], :formats=>[:html], :locale=>[:en, :en]} in view paths "/home/jason/VirtualRestaurant3/app/views", "/home/jason/.rvm/gems/ruby-1.9.2-preview3/gems/devise-1.1.rc0/app/views" How does Devise do it? My gem: http://github.com/jrmurad/SortableNestedSet Devise gem: +http://+github.com/plataformatec/devise

    Read the article

  • VisualSVN Server , Windows 7 and Apache Problem

    - by Ash
    I am running Visual SVN Server(with Apache) on a Windows 7 computer and network. After about 15-20 minutes of my first commit/update, I am unable to access the repository via Tortoise SVN. The error message I get is: OPTIONS of "https://jason/svn/repository1": could not connect to server (https://jason) Restarting the Visual SVN Server service helps sometimes but fails quite often. The only sure-shot way to get it working is to restart the computer. The server - https://jason is also not accessible via the browser when I get this error 1) I tried reinstalling Windows 7, Visual SVN server and Tortoise SVN but I still keep getting this error. 2) I searched several forums but I dont seem to be able to find an answer. Please help.

    Read the article

  • how to redirect terminal contents to a jtextpane?

    - by sonu thomas
    hi.. I was trying to run a java class file using java code.The aim was to direct the executing sequence of the terminal of fedora 10 into a frame with a textpane. My code is: import java.io.DataInputStream; import java.io.IOException; import javax.swing.JDialog; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JTextArea; import javax.swing.JTextPane; //import sun.reflect.ReflectionFactory.GetReflectionFactoryAction; public class file { /** * @param args */ /** * @param args * @throws IOException */ public static void main(String[] args) throws IOException{ // TODO Auto-generated method stub JDialog jj = new JDialog(); jj.setTitle("helllo"); String sssub1,sssub2,sssub3; String ss="C:/Users/sonu/Desktop/ourIDE/src/src/nn.java"; JPanel n = new JPanel(); jj.setContentPane(n); JTextPane tpn2=new JTextPane(); jj.getContentPane().add(tpn2); jj.setVisible(true); Runtime runtime; Process process; if(ss.indexOf(" ")==-1) { try { runtime= Runtime.getRuntime(); sssub1="/home/ss/Desktop/src/"; sssub2="nn"; process=runtime.exec("sh jrun.sh "+sssub1+" "+sssub2); DataInputStream data=new DataInputStream(process.getInputStream()); DataInputStream data_data=new DataInputStream(process.getErrorStream()); String s="",t=""; int ch; while((ch=data.read())!=-1){ s=s+(char)ch; } data.close(); while((ch=data_data.read())!=-1){ t=t+(char)ch; } data_data.close(); if(t.equals("")) { s+="\nNormal Termination."; tpn2.setText(s); } else tpn2.setText(t); }catch(Exception e){ System.out.println("Error executing file==>"+e);} } } } The content of **jrun.sh** is cd $1 java $2 When the content of **nn.java** was this: import java.io.*; class nn { public static void main(String[] ar)throws IOException { int i=90; BufferedReader dt = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter"); //i=Integer.parseInt(dt.readLine()); line--notable System.out.println("i="+i); } } It worked smoothly But when I remove the comment on line--notable,it gave me Textpane with no content. The problem is : I cant read an input from nn.java Kindly give me a solution... If i am able to: get the terminal pop up with executing the nn.class,and i am able to enter the input,then it will do... Thanks in advance...

    Read the article

  • See former key sequences in vim

    - by Vasiliy Sharapov
    Sometimes I share screen shots and clips of vim usage with others. It would be nice to expand on the part of the status bar highlighted in this picture: I would like some way to make previous key sequences visible as well, such as: y2w jj f[ p 2d - You can see the key sequences leading up to the current one. I'll elaborate on my wish list at the bottom. Is something like this is available as a plugin or vim script? The sheer number of scripts available on vim online makes this hard to find by keyword. Some features I would hope for (but seem improbable): Delimit key sequences with a non-keyboard character instead of space, and a different one for the current command, so y2w jj f[ p 2d might become y2w¦jj¦f[¦p » 2d Replace keys that have a letter alternative with the alternative, such as the right arrow key - ^[[C with the equivalent l. Edit: To clarify, the right arrow key is a valid key in vim, but has no character to represent it, the l key preforms the same function and could/should substitute it. Have previous keystrokes run all the way to the beginning of the line (instead of just one or two), and just have vim's command prompt overwrite it when necessary. Replace some keystrokes with a more elegant alternative, for example hhhhh with 5h or more impressively d2f) with d% (in the appropriate situation).

    Read the article

  • Friends Don’t Let Friends Play with Portal Guns [Video]

    - by Jason Fitzpatrick
    Many Portal fan films are sci-fi stories in their own right; this humorous video is simply focused on what happens when three guys get their hands on a portal gun. Jason Craft, the video’s director, explains: My interpretation of what a real POrtal gun would be like if one existed. Based on the video game, POrtal. I tried to match the game as close as possible. This was the most challenging project I have ever undertaken, consisting of 3D tracking, seamless camera cuts and 3D camera projection. ENJOY! We certainly wish our goofing around with friends videos came off this polished. For those of you wondering how he got such an awesome Portal Gun prop, it’s all CGI (you can check out his model here). [via Boing Boing] HTG Explains: What Is Windows RT & What Does It Mean To Me? HTG Explains: How Windows 8′s Secure Boot Feature Works & What It Means for Linux Hack Your Kindle for Easy Font Customization

    Read the article

  • win 7: copy all files from a complex folder structure to one folder

    - by Jason
    I'd have a complex folder structure like: h:\folder1\folder2\folder3 h:\folder1\folder2\a h:\folder1\b h:\folder1\folder3 h:\folder1\folder4\d Only with probably 100's of folders and a depth of around 4 (I'm guessing) Anyway I want to run a command that will move all the files from every sub folder into the top level folder. so something like h:\folder1\*\*.* to h:\folder1 Is there a tool I can use to do this? does win 7 have a command that will do this? Thanks Jason

    Read the article

  • Port forwarding using ASDM 6.0

    - by Jason
    Hey guys, I'm not too savvy with ASDM and it has been quite some time since I have done anything IOS so forgive me. I am trying to forward port 3389 from 'any' on 'outside' (1.1.1.1) to an internal server (10.10.10.10). Can anybody give me the steps to do this using ASDM or IOS. Thanks, -Jason

    Read the article

  • Const operator overloading problems in C++

    - by steigers
    Hello everybody, I'm having trouble with overloading operator() with a const version: #include <iostream> #include <vector> using namespace std; class Matrix { public: Matrix(int m, int n) { vector<double> tmp(m, 0.0); data.resize(n, tmp); } ~Matrix() { } const double & operator()(int ii, int jj) const { cout << " - const-version was called - "; return data[ii][jj]; } double & operator()(int ii, int jj) { cout << " - NONconst-version was called - "; if (ii!=1) { throw "Error: you may only alter the first row of the matrix."; } return data[ii][jj]; } protected: vector< vector<double> > data; }; int main() { try { Matrix A(10,10); A(1,1) = 8.8; cout << "A(1,1)=" << A(1,1) << endl; cout << "A(2,2)=" << A(2,2) << endl; double tmp = A(3,3); } catch (const char* c) { cout << c << endl; } } This gives me the following output: NONconst-version was called - - NONconst-version was called - A(1,1)=8.8 NONconst-version was called - Error: you may only alter the first row of the matrix. How can I achieve that C++ call the const-version of operator()? I am using GCC 4.4.0. Thanks for your help! Sebastian

    Read the article

  • jQuery / Dynatree: How to use Json or ul/li together with IFrame sample

    - by ggerri
    Hi I'm a newbie with dynatree, but happy that i've found this supercool plugin. On the dynatree site, I've found an example how to use it with IFrames http://wwwendt.de/tech/dynatree/doc/sample-iframe.html I was able to adapt the IFrame example successfully. But i'm a bit stuck here, because I'd like to load the tree either via UL/LI or better, with Jason/Ajax. my problem now is, that I dont understand how to provide ther url/links with LI or Jason, so that clicking an entry still opens the linked site in the iframe. Also don't know how I have to format parents/children/subchildren in Json.. Would anybody be so kind to give a sample with iframe and jason/ajax or iframe with ul/li? Thanks a lot :-) G

    Read the article

  • How can I write query to output this format in SQLite?

    - by GivenPie
    I would like to output in this format: e.EE_id e.FNAME e.LNAME SUPer_id s.FNAME s.LNAME --- --------- -------------- --- ------------- ------------------- 1 Ziqiao Li 2 Charlie Li 1 Ziqiao Li 3 George Pee 2 Charlie Li 4 Jason Dee 2 Charlie Li 5 Petey Wee 2 Charlie Li From this table created : I need to display the Primary key and foreign key in the same results while displaying the foreign key name values for the primary key names. Create table Employees( ee_id integer, fname varchar(20), lname varchar(20), super_id integer, Constraint emp_Pk Primary Key (ee_id), Constraint emp_Fk Foreign Key (super_id) references employees (ee_id) ); INSERT INTO Employees VALUES(1,'Charlie','Li',null); INSERT INTO Employees VALUES(2,'Ziqiao','Lee',1); INSERT INTO Employees VALUES(3,'George','Pee',2); INSERT INTO Employees VALUES(4,'Jason','Dee',2); INSERT INTO Employees VALUES(5,'Petey','Wee',2); Select ee_id, fname, lname, super_id from employees; ee_id fname lname super_id ---------- ---------- ---------- ---------- 1 Charlie Li 2 Ziqiao Lee 1 3 George Pee 2 4 Jason Dee 2 5 Petey Wee 2 Do I need to create a view?

    Read the article

  • SQL 2005 AD Group permission levels

    - by jj.
    I'm trying to give permissions to a (sql 2005) database app based on AD groups. The general idea is to require a user to have a membership to "app_users" to view anything, and membership to other groups gives them write access to that group. "app_customers" gives write access to the customers module, "app_sales" to sales, etc. I've listed an example below: user1: AD member of app_users user2: AD member of app_users, app_customers For dbo.customers table: app_users - Granted: Select permission - Denied: Insert, Update, Delete app_customers - Granted: Select permission - Granted: Insert, Update, Delete I would expect user1 to be able to view the dbo.customers table, but will not be allowed to modify anything (insert/update/delete) - which works. In the same vein, I would expect user2 to be able to view AND modify the dbo.customers table, since they are a member of app_customers. However, this is not the case. Instead, user2 is denied any modifications just like user1. I seem to remember something about deny permissions winning if there was a conflict, but it's honestly been too long since I've dealt with them. Am I going about this the right way? Thanks for your time!

    Read the article

  • Exchange 2010 SP2 Not Allowing Logon for Users with Expired Passwords

    - by JJ.
    When we provision users we set the "User must change password at next logon" flag and instruct them to go to OWA to login for the first time and change their password. Using the registry setting ChangeExpiredPasswordEnabled as explained here: http://technet.microsoft.com/en-us/library/bb684904.aspx worked well prior to SP2 installation. This allows users with 'expired' passwords to logon and forces a password change before they can access OWA. We just installed Exchange 2010 Service Pack 2 and now it's no longer working. Users with this flag set ('expired' passwords) can't login in at all unless we clear the flag. FYI here's the registry key configuration as set now with SP2 installed: Any suggestions as to how I might fix this? Or did MS break this feature in Service Pack 2?

    Read the article

  • Reporting Services Error 401: Unauthorized

    - by JJ
    I am trying to setup reporting services on a SQL server 2008 and get this error message when I try to connect to the http://localhost/reports The request failed with HTTP status 401: Unauthorized. I asked the server administrator and the IIS should be running (can't find it under administrative tools though) I used the Reporting Services Configuration manager to setup reporting services and am pretty sure it is setup correct.

    Read the article

  • What are the Best Practices and tools for managing Windows Desktops from a linux sever ?

    - by JJ
    I know this is a loaded question! What are the best ways to manage Windows (2000, XP, Vista, Win7) workstation from a centralized linux server. I would like to replace the fuctionaility of MS SBS Server with a linux box. The following issues would need to be addressed. File Sharing Authentication, Authorization, and Access Control Software Installation Centralized Login Script Centralized Backup

    Read the article

  • Thunderbird 3 "Reply to all", also replies to myself

    - by Jj
    I have my job IMAP account set up in TB 3.0.3. It's becoming very annoying that in group emails where I'm in the CC or TO list I hit "Reply To All" and I find myself in the recipients list. So when I send the email I also get a copy of my own email. I haven't found where to disable or modify this. This doesn't happen with my Gmail account (also set up in TB)

    Read the article

  • Google reader Keyboard shortcuts not working in Firefox 3.6

    - by Jj
    I just upgraded to Ubuntu 10.04 which comes with Firefox 3.6.3. Now Google reader some keyboard shortcuts stopped working, The j/k keys are ok, but 'v', 'Shift+x' and others don't work and start the Search As You type functionality I've always used. The Javascript console only shows this warning: Warning: The 'charCode' property of a keyup event should not be used. The value is meaningless. Source File: http://www.google.com/reader/view/?tab=my#overview-page Line: 0 This did not happen with Firefox 3.5.x even though I've always had the Search as you type option enabled.

    Read the article

  • 12-24 rack, 10-32 server thumbscrew. How to mount?

    - by JJ.
    We have just purchased a APC rack (model AR204A) with 12-24 threaded holes. We couldn't get a "square hole" model in time for our setup deadline. Unfortunately our rack servers (Lenovo RD240) appear to have 10-32 thumbscrews for securing the server to the rack. We've successfully mounted the server rails to the rack using 12-24 screws however the 10-32 thumbscrews in the server front won't "grab" the 12-24 holes in the rack, thus there is nothing to stop the server from sliding right off the rack if pushed from the back. The thumb screws on the server don't seem to be removable, so we can't simply use 12-24 screws instead. Any suggestions on how to work around this problem? Is there any way to "convert" a 12-24 hole to a 10-32 thread (or similar approach)? Thanks in advance.

    Read the article

  • What at the Best Practices and tools for managing Windows Desktops from a linux sever ?

    - by JJ
    I know this is a loaded question! What are the best ways to manage Windows (2000, XP, Vista, Win7) workstation from a centralized linux server. I would like to replace the fuctionaility of MS SBS Server with a linux box. The following issues would need to be addressed. File Sharing Authentication, Authorization, and Access Control Software Installation Centralized Login Script Centralized Backup

    Read the article

  • links for 2010-04-01

    - by Bob Rhubart
    Jason Williamson: Oracle Releases New Mainframe Re-Hosting in Oracle Tuxedo 11g Jason Williamson's update on new features in the latest release of Oracle Tuxedo 11g. (tags: otn oracle entarch) Jeanne Waldman: Using Oracle ADF Data Visualization Tools (DVT) Line Graphs to Display Weather Information Jeanne Waldman illustrates the nuts and bolts of modifications she made to a a simple JDeveloper Fusion application that retrieves weather data. I have a simple JDeveloper Fusion application that retrieves weather data. (tags: oracle otn virtualization jdeveloper ADF) Brian Harrison: Oracle WebCenter Interaction - New Release Overivew, Part 2 Brian Harrison continue his discussion of the next release of Oracle WebCenter Interaction with a look at at a few other new features. (tags: oracle otn enterprise2.0 webcenter)

    Read the article

  • Plan Operator Tuesday round-up

    - by Rob Farley
    Eighteen posts for T-SQL Tuesday #43 this month, discussing Plan Operators. I put them together and made the following clickable plan. It’s 1000px wide, so I hope you have a monitor wide enough. Let me explain this plan for you (people’s names are the links to the articles on their blogs – the same links as in the plan above). It was clearly a SELECT statement. Wayne Sheffield (@dbawayne) wrote about that, so we start with a SELECT physical operator, leveraging the logical operator Wayne Sheffield. The SELECT operator calls the Paul White operator, discussed by Jason Brimhall (@sqlrnnr) in his post. The Paul White operator is quite remarkable, and can consume three streams of data. Let’s look at those streams. The first pulls data from a Table Scan – Boris Hristov (@borishristov)’s post – using parallel threads (Bradley Ball – @sqlballs) that pull the data eagerly through a Table Spool (Oliver Asmus – @oliverasmus). A scalar operation is also performed on it, thanks to Jeffrey Verheul (@devjef)’s Compute Scalar operator. The second stream of data applies Evil (I figured that must mean a procedural TVF, but could’ve been anything), courtesy of Jason Strate (@stratesql). It performs this Evil on the merging of parallel streams (Steve Jones – @way0utwest), which suck data out of a Switch (Paul White – @sql_kiwi). This Switch operator is consuming data from up to four lookups, thanks to Kalen Delaney (@sqlqueen), Rick Krueger (@dataogre), Mickey Stuewe (@sqlmickey) and Kathi Kellenberger (@auntkathi). Unfortunately Kathi’s name is a bit long and has been truncated, just like in real plans. The last stream performs a join of two others via a Nested Loop (Matan Yungman – @matanyungman). One pulls data from a Spool (my post – @rob_farley) populated from a Table Scan (Jon Morisi). The other applies a catchall operator (the catchall is because Tamera Clark (@tameraclark) didn’t specify any particular operator, and a catchall is what gets shown when SSMS doesn’t know what to show. Surprisingly, it’s showing the yellow one, which is about cursors. Hopefully that’s not what Tamera planned, but anyway...) to the output from an Index Seek operator (Sebastian Meine – @sqlity). Lastly, I think everyone put in 110% effort, so that’s what all the operators cost. That didn’t leave anything for me, unfortunately, but that’s okay. Also, because he decided to use the Paul White operator, Jason Brimhall gets 0%, and his 110% was given to Paul’s Switch operator post. I hope you’ve enjoyed this T-SQL Tuesday, and have learned something extra about Plan Operators. Keep your eye out for next month’s one by watching the Twitter Hashtag #tsql2sday, and why not contribute a post to the party? Big thanks to Adam Machanic as usual for starting all this. @rob_farley

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >