Search Results

Search found 3707 results on 149 pages for 'adrian lang'.

Page 23/149 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • .htaccess language redirects with seo-friendly urls

    - by jlmmns
    How do I setup my .htaccess file to detect several languages, and redirect them to specific seo-friendly urls? Basically every url needs to go to index.php?lang=(...) So, for English language detection http://mysite.com has to go to http://mysite.com/en/ (index.php?lang=en) my .htaccess as of now (not working): RewriteEngine On RewriteCond %{HTTP:HOST} http://mysite.com/ RewriteCond %{HTTP:Accept-Language} ^en [NC] RewriteRule ^$ http://mysite.com/en/ [L,R=301] RewriteCond %{HTTP:Accept-Language} ^de [NC] RewriteRule ^$ http://mysite.com/de/ [L,R=301] RewriteCond %{HTTP:Accept-Language} ^nl [NC] RewriteRule ^$ http://mysite.com/nl/ [L,R=301] RewriteCond %{HTTP:Accept-Language} ^fr [NC] RewriteRule ^$ http://mysite.com/fr/ [L,R=301] RewriteCond %{HTTP:Accept-Language} ^es [NC] RewriteRule ^$ http://mysite.com/es/ [L,R=301] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(en|de|nl|fr|es)$ index.php?lang=$1 [L,QSA]

    Read the article

  • Help a Beginner with a PHP based Login System

    - by Brian Lang
    I'm a bit embarrassed to say, but I've run into issue with creating a PHP based login system. I'm using a site template to handle the looks of the the login process, so I will spare you the code. Here is my thought process on how to handle the login: Create a simple login.php file. On there will be a form whose action is set to itself. It will check to see if the submit has been clicked, and if so validate to make sure the user entered a valid password / username. If they do, set a session variable save some login info (username, NOT password), and redirect them to a restricted area. If the login info isn't valid, save an error message in a session variable, display error message giving further instruction, and wait for the user to resubmit. Here is a chunk of what I have - hopefully one of you experts can see where I've gone wrong, and give me some insight: if(isset($_POST['submit'])) { if(!empty($_POST['username']) AND !empty(!$_POST['password'])) { header("Location: http://www.google.com"); } else { $err = 'All the fields must be filled in!'; } } if($err) { $_SESSION['msg']['login-err'] = $err; } ? Now the above is just an example - the intent of the above code is to process user input, with the script validating simply that the user has given input for username and password. If they have, I would like them, in this case, to be redirected to google.com (for the sake of this example). If not, save an error message. Given my current code, the error message will display perfectly, however if the user submits and has something entered for the username and password, the page simply doesn't redirect. I'm sure this is a silly question, but I am a beginner, and well, to be honest, a bit buzzed right now. Thanks so much!

    Read the article

  • Round date to 10 minutes interval

    - by Peter Lang
    I have a DATE column that I want to round to the next-lower 10 minute interval in a query (see example below). I managed to do it by truncating the seconds and then subtracting the last digit of minutes. WITH test_data AS ( SELECT TO_DATE('2010-01-01 10:00:00', 'YYYY-MM-DD HH24:MI:SS') d FROM dual UNION SELECT TO_DATE('2010-01-01 10:05:00', 'YYYY-MM-DD HH24:MI:SS') d FROM dual UNION SELECT TO_DATE('2010-01-01 10:09:59', 'YYYY-MM-DD HH24:MI:SS') d FROM dual UNION SELECT TO_DATE('2010-01-01 10:10:00', 'YYYY-MM-DD HH24:MI:SS') d FROM dual UNION SELECT TO_DATE('2099-01-01 10:00:33', 'YYYY-MM-DD HH24:MI:SS') d FROM dual ) -- #end of test-data SELECT d, TRUNC(d, 'MI') - MOD(TO_CHAR(d, 'MI'), 10) / (24 * 60) FROM test_data And here is the result: 01.01.2010 10:00:00    01.01.2010 10:00:00 01.01.2010 10:05:00    01.01.2010 10:00:00 01.01.2010 10:09:59    01.01.2010 10:00:00 01.01.2010 10:10:00    01.01.2010 10:10:00 01.01.2099 10:00:33    01.01.2099 10:00:00 Works as expected, but is there a better way? EDIT: I was curious about performance, so I did the following test with 500.000 rows and (not really) random dates. I am going to add the results as comments to the provided solutions. DECLARE t TIMESTAMP := SYSTIMESTAMP; BEGIN FOR i IN ( WITH test_data AS ( SELECT SYSDATE + ROWNUM / 5000 d FROM dual CONNECT BY ROWNUM <= 500000 ) SELECT TRUNC(d, 'MI') - MOD(TO_CHAR(d, 'MI'), 10) / (24 * 60) FROM test_data ) LOOP NULL; END LOOP; dbms_output.put_line( SYSTIMESTAMP - t ); END; This approach took 03.24 s.

    Read the article

  • Strange behavior with large Object Types

    - by Peter Lang
    I recognized that calling a method on an Oracle Object Type takes longer when the instance gets bigger. The code below just adds rows to a collection stored in the Object Type and calls the empty dummy-procedure in the loop. Calls are taking longer when more rows are in the collection. When I just remove the call to dummy, performance is much better (the collection still contains the same number of records): Calling dummy: Not calling dummy: 11 0 81 0 158 0 Code to reproduce: Create Type t_tab Is Table Of VARCHAR2(10000); Create Type test_type As Object( tab t_tab, Member Procedure dummy ); Create Type Body test_type As Member Procedure dummy As Begin Null; --# Do nothing End dummy; End; Declare v_test_type test_type := New test_type( New t_tab() ); Procedure run_test As start_time NUMBER := dbms_utility.get_time; Begin For i In 1 .. 200 Loop v_test_Type.tab.Extend; v_test_Type.tab(v_test_Type.tab.Last) := Lpad(' ', 10000); v_test_Type.dummy(); --# Removed this line in second test End Loop; dbms_output.put_line( dbms_utility.get_time - start_time ); End run_test; Begin run_test; run_test; run_test; End; I tried with both 10g and 11g. Can anyone explain/reproduce this behavior?

    Read the article

  • How can I set different Tooltip text for each item in a listbox?

    - by Michael Lang
    I have a listbox that is databound to a Collection of objects. The listbox is configured to display an identifier property of each object. I would like to show a tooltip with information specific to the item within the listbox that is being hovered over rather than one tooltip for the listbox as a whole. I am working within WinForms and thanks to some helpful blog posts put together a pretty nice solution, which I wanted to share. I'd be interested in seeing if there's any other elegant solutions to this problem, or how this may be done in WPF.

    Read the article

  • Figuring out the resource a lock in SQL Server 2000 affects

    - by Michael Lang
    I am adding a simple web-interface to show data from a commercial off the shelf (COTS) application. This COTS issues locks on any record the user is actively looking at (whether they intend to edit and update it or not). I have found sp_lock and the Microsoft sp_lock2 scripts and can see the locks, so that's all well and good. However, I cannot figure out how I can tell if a specific record I am about to update has been affected by one of these locks. If I submit the update request and there is in fact a lock, the web-interface will wait indefinitely until the user closes the window in the COTS. How can I either: a) determine before issuing an update that the record has been locked OR b) issue an update that will immediately return with a LOCKED status rather than indefinitely waiting on the COTS user to close their window on that record?

    Read the article

  • Convert octet string to human readable

    - by Michael Lang
    Using the pysnmp framework i get some values doing a snmp walk. Unfortunately for the oid 1.3.6.1.21.69.1.5.8.1.2 (DOCS-CABLE-DEVICE-MIB) i get a weird result which i cant correctly print here since it contains ascii chars like BEL ACK When doing a repr i get: OctetString('\x07\xd8\t\x17\x03\x184\x00') But the output should look like: 2008-9-23,3:24:52.0 the format is called "DateAndTime". How can i translate the OctetString output to a "human readable" date/time ?

    Read the article

  • links for 2010-06-03

    - by Bob Rhubart
    @rluttikhuizen: Fault handling in Oracle SOA Suite 11g "When it comes to technical faults," says  Oracle ACE Ronald van Luttikhuizen, "you probably do not want to design error handling in the process itself." (tags: soa oracleace oracle otn) Adrian Campbell: Enterprise Architecture and Zombies EA blogger Adrian Campbell invokes Harry Potter, the Lord of the Rings, Black Adder, and "Pride and Prejudice and Zombies" in this interpretation of Gartner's 10 EA pitfalls. (tags: entarch zombies gartner) Nathalie Roman: Oracle Forms -- alive and kicking Oracle ACE Director Nathalie Roman offers details on a recent Oracle Forms Modernization seminar.  (tags: oracle otn oracleace fusionmiddleware soa) Trond-Arne Undheim: Is Openness at the heart of the EU Digital Agenda? Trond-Arne Undheim shares some insight into the upcoming OpenForum Europe Summit 2010, to be held in Brussels. (tags: oracle otn entarch architect) Chris Raby: Oracle Financial Analytics Presentations and Photos Chris Raby shares details on Rittman Mead's series of seminars that combine the company's in-depth technical knowledge with a greater focus on the business perspective.  (tags: entarch bi architect oracle otn) June Oracle Technology Network NEW Member Benefits - books books and more books!!! Details on how OTN members can get discounts on books from APress, CRC, Pearson, and Packt Publishing.  (tags: oracle otn community books discounts) Manoj Neelapu: Oracle Service Bus + SOA in same server Manoj Neelapu's  tutorial covers on how to do create a domain in which SOA and Oracle Service Bus run in a single JVM . (tags: oracle otn soa architect)

    Read the article

  • links for 2010-06-16

    - by Bob Rhubart
    Automating Enterprise Reporting with SOA and Oracle Business Intelligence Publisher In the latest article in the Enterprise Solution Cookbook series, authors John Chung and Harish Gaur take you step-by-step through the development of an automated reporting platform using Oracle's SOA Suite, WebCenter, and Business Intelligence Publisher. (tags: soa enterprise2.0 architect entarch bpm oracle otn) @ORACLENERD: Job: Infrastructure Technical Architect Oracle ACE Chet "ORACLENERD" Justice shares the 411 on a great new gig for the right architect.  (tags: jobs employment infrastructure architect oracleace) Andrew Ness: Building a training environment for RAC, ASM and Dataguard on OEL 5.4 "In all the environments I've worked in where Oracle DBAs are involved, " says Ness, "they would have chewed my arm off to have this level of control over where their data lives." (tags: oracle grid database dba) Chris Quenelle: Virtualization terms UNIXy Goodness blogger Chris Quenelle dives into Wikipedia to compile this short but valuable glossary of virtualization terms.  (tags: solaris hypervisor virtualization) William Vambenepe: CMDB in the Cloud: not your father's CMDB "Most [customers] will be dealing with a mix of old-style and Cloud applications and they’ll be looking for a unified management approach. This helps CMDB incumbents. If you doubt the power to continuity, take a minute to realize that the entire value proposition of hypervisor-style virtualization is centered around it." -- William Vambenepe (tags: oracle otn cloud virtualization) Merv Adrian: Oracle Exadata: a Data Management Tipping Point "In this second version of its newest platform, Oracle not only provides the latest technology in each part of the data-management architecture, but also integrates them under the full control of one vendor, with a unified approach to leveraging the full stack." -- Merv Adrian (tags: oracle exadata database)

    Read the article

  • Windows Azure BidNow Sample &ndash; definitely worth a look

    - by Eric Nelson
    [Quicklink: download new Windows Azure sample from http://bit.ly/bidnowsample] On Mondays (17th May) in the  6 Weeks of Windows Azure training (Now full) Live Meeting call, Adrian showed BidNow as a sample application built for Windows Azure. I was aware of BidNow but had not found the time to take a look at it nor seems it running before. Adrian convinced me it was worth some a further look. In brief I like it :-) It is more than Hello World, but still easy enough to follow. Bid Now is an online auction site designed to demonstrate how you can build highly scalable consumer applications using Windows Azure. It is built using Visual Studio 2008, Windows Azure and uses Windows Azure Storage. Auctions are processed using Windows Azure Queues and Worker Roles. Authentication is provided via Live Id. Bid Now works with the Express versions of Visual Studio and above. There are extensive setup instructions for local and cloud deployment You can download from http://bit.ly/bidnowsample (http://code.msdn.microsoft.com/BidNowSample) and also check out David original blog post. Related Links UK based? Sign up to UK fans of Windows Azure on ning Check out the Microsoft UK Windows Azure Platform page for further links

    Read the article

  • Getting an Access 2007 table (.accdb extension) in ArcMap programmatically

    - by Adrian
    I have recently found a script from ArcScripts on how to get an Access table in ArcGIS programmatically and it works well. But this is for Access 2003 (.mdb extension) and earlier. The code is posted below, and I want to know how to modify it for using Access 2007 (.accdb extension) and later databases. Attribute VB_Name = "Access_connect" Sub Open_Access_Connect() 'V. Guissard Jan. 2007 On Error GoTo EH Dim data_source As String Dim pTable As ITable Dim TableName As String Dim pFeatWorkspace As IFeatureWorkspace Dim pMap As IMap Dim mxDoc As IMxDocument Dim pPropset As IPropertySet Dim pStTab As IStandaloneTable Dim pStTabColl As IStandaloneTableCollection Dim pWorkspace As IWorkspace Dim pWorkspaceFact As IWorkspaceFactory Set pPropset = New PropertySet ' Get MDB file name data_source = GetFolder("mdb") ' Connect to the MDB database pPropset.SetProperty "CONNECTSTRING", "Provider=Microsoft.Jet.OLEDB.4.0;" _ & "Data source=" & data_source & ";User ID=Admin;Password=" Set pWorkspaceFact = New OLEDBWorkspaceFactory Set pWorkspace = pWorkspaceFact.Open(pPropset, 0) Set pFeatWorkspace = pWorkspace ' Get table name TableName = SelectDataSet(pFeatWorkspace, "Table") ' Open the table Set pTable = pFeatWorkspace.OpenTable(TableName) 'Create Table collection and add the table to ArcMap Set mxDoc = ThisDocument Set pMap = mxDoc.FocusMap Set pStTab = New StandaloneTable Set pStTab.Table = pTable Set pStTabColl = pMap pStTabColl.AddStandaloneTable pStTab ' Update ArcMap Source TOC mxDoc.UpdateContents Exit Sub EH: MsgBox "Access connect: " & Err.Number & " " & Err.Description End Sub Public Function GetFolder(Optional aFilter As String) As String ' Open a GUI to let the user select a Folder path name (by default) or : ' Set aFilter = "shp" to get a shapefile name ' Set aFilter = "mdb" to get an MS Access file name ' Return the Folder Path or phath & file name As String ' V. Guissard Jan. 2007 Dim pGxDialog As IGxDialog Dim pFilterCol As IGxObjectFilterCollection Dim pCurrentFilter As IGxObjectFilter Dim pEnumGx As IEnumGxObject Select Case aFilter Case "shp" Set pCurrentFilter = New GxFilterShapefiles aTitle = "Select Shapefile" Case "mdb" Set pCurrentFilter = New GxFilterContainers aTitle = "Select MS Access database" Case Else Set pCurrentFilter = New GxFilterBasicTypes aTitle = "Select Folder" End Select Set pGxDialog = New GxDialog Set pFilterCol = pGxDialog With pFilterCol .AddFilter pCurrentFilter, True End With With pGxDialog .Title = aTitle .ButtonCaption = "Select" End With If Not pGxDialog.DoModalOpen(0, pEnumGx) Then Smp = MsgBox("No selection : Exit", vbCritical) End 'Exit Function 'Exit if user press Cancel End If GetFolder = pEnumGx.Next.FullName End Function Public Function SelectDataSet(pWorkspace As IWorkspace, Optional theDataType As String) As String ' Open a GUI to let the user select a DataSet into a Workspace ' (Table or Request into an MS Access Database or a Geodatabase File) ' Set pWorkspace to the DataSet IWorkspace ' Set theDataType = "Table" to select a Table name of the DataSet ' Return the selected Table or Request Table name As String ' V. Guissard Jan. 2007 Dim aDataset As Boolean Dim boolOK As Boolean Dim DataSetList As New Collection Dim datasetType As Integer Dim n As Integer Dim pDataSetName As IDatasetName Dim pListDlg As IListDialog Dim pEnumDatasetName As IEnumDatasetName ' Set the Dataset Type Select Case theDataType Case "Table" datasetType = 10 Case Else Answ = MsgBox("Need a Dataset Type : Exit", vbCritical, "SelectDataset") End End Select ' Get the Dataset Names included in the workspace Set pEnumDatasetName = pWorkspace.DatasetNames(datasetType) ' Create the Dataset Names List Dialog aDataset = False Set pListDlg = New ListDialog pEnumDatasetName.Reset Set pDataSetName = pEnumDatasetName.Next Do While Not pDataSetName Is Nothing pListDlg.AddString pDataSetName.name DataSetList.Add (pDataSetName.name) Set pDataSetName = pEnumDatasetName.Next aDataset = True Loop ' Open a GUI for the user to select a dataset If aDataset Then boolOK = pListDlg.DoModal("Select a " & theDataType, 0, Application.hwnd) n = pListDlg.choice If (n <> -1) Then SelectDataSet = DataSetList(n + 1) Else Sup = MsgBox("No DataSet selected : EXIT", vbCritical, "SelectDataset") End End If End If End Function Here is the link to the ArcScript: http://arcscripts.esri.com/Data/AS14882.bas PS I know this code is written in VBA and I don't know if a modified version is in VB.NET or whatever else language. Thanks, Adrian

    Read the article

  • Trouble installing Matlab

    - by user94143
    So whenever I try to install Matlab, the first image appears, but then goes away and that's the end of it. Here's what I'm doing- user@host$> cd ~/mathworks_downloads user@host$> unzip matlab_R2012a_student_glnx86_installer.zip user@host$> ./install The Matlab logo and image pop up here for a few seconds before going away. This is the output I receive- Could not find JRE for glnxa64. Trying glnx86. Preparing installation files ... Installing ... Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class java.awt.Component at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at $Proxy11.<clinit>(Unknown Source) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.reflect.Proxy.newProxyInstance(Unknown Source) at com.google.inject.internal.ConstructionContext.createProxy(ConstructionContext.java:81) at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:70) at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111) at com.google.inject.FactoryProxy.get(FactoryProxy.java:56) at com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45) at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811) at com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42) at com.google.inject.Scopes$1$1.get(Scopes.java:54) at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48) at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:758) at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811) at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:754) at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:89) at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:89) at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:95) at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48) at com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45) at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811) at com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42) at com.google.inject.Scopes$1$1.get(Scopes.java:54) at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48) at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42) at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66) at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:84) at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111) at com.google.inject.FactoryProxy.get(FactoryProxy.java:56) at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42) at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66) at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:84) at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111) at com.google.inject.FactoryProxy.get(FactoryProxy.java:56) at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42) at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66) at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:84) at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111) at com.google.inject.FactoryProxy.get(FactoryProxy.java:56) at com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45) at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811) at com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42) at com.google.inject.Scopes$1$1.get(Scopes.java:54) at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48) at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:758) at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811) at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:754) at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:89) at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:89) at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:95) at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48) at com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45) at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811) at com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42) at com.google.inject.Scopes$1$1.get(Scopes.java:54) at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48) at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42) at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66) at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:84) at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111) at com.google.inject.FactoryProxy.get(FactoryProxy.java:56) at com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45) at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811) at com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42) at com.google.inject.Scopes$1$1.get(Scopes.java:54) at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48) at com.google.inject.InjectorImpl$4$1.call(InjectorImpl.java:758) at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:804) at com.google.inject.InjectorImpl$4.get(InjectorImpl.java:754) at com.google.inject.InjectorImpl.getInstance(InjectorImpl.java:793) at com.mathworks.wizard.WizardLauncher.startWizard(WizardLauncher.java:160) at com.mathworks.wizard.WizardLauncher.start(WizardLauncher.java:75) at com.mathworks.wizard.AbstractLauncher.launch(AbstractLauncher.java:27) at com.mathworks.wizard.AbstractLauncher.launchStandalone(AbstractLauncher.java:18) at com.mathworks.studentinstaller.Launcher.main(Launcher.java:23) Finished After that, nothing happens, although apparently a Matlab window is supposed to open. Is this a problem caused by the fact that I'm running OpenJKD 7 instead of JRE 7u7?

    Read the article

  • Hidden exceptions

    - by user12617285
    Occasionally you may find yourself in a Java application environment where exceptions in your code are being caught by the application framework and either silently swallowed or converted into a generic exception. Either way, the potentially useful details of your original exception are inaccessible. Wouldn't it be nice if there was a VM option that showed the stack trace for every exception thrown, whether or not it's caught? In fact, HotSpot includes such an option: -XX:+TraceExceptions. However, this option is only available in a debug build of HotSpot (search globals.hpp for TraceExceptions). And based on a quick skim of the HotSpot source code, this option only prints the exception class and message. A more useful capability would be to have the complete stack trace printed as well as the code location catching the exception. This is what the various TraceException* options in in Maxine do (and more). That said, there is a way to achieve a limited version of the same thing with a stock standard JVM. It involves the use of the -Xbootclasspath/p non-standard option. The trick is to modify the source of java.lang.Exception by inserting the following: private static final boolean logging = System.getProperty("TraceExceptions") != null; private void log() { if (logging && sun.misc.VM.isBooted()) { printStackTrace(); } } Then every constructor simply needs to be modified to call log() just before returning: public Exception(String message) { super(message); log(); } public Exception(String message, Throwable cause) { super(message, cause); log(); } // etc... You now need to compile the modified Exception.java source and prepend the resulting class to the boot class path as well as add -DTraceExceptions to your java command line. Here's a console session showing these steps: % mkdir boot % javac -d boot Exception.java % java -DTraceExceptions -Xbootclasspath/p:boot -cp com.oracle.max.vm/bin test.output.HelloWorld java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.(ZipFile.java:127) at java.util.jar.JarFile.(JarFile.java:135) at java.util.jar.JarFile.(JarFile.java:72) at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:646) at sun.misc.URLClassPath$JarLoader.access$600(URLClassPath.java:540) at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:607) at java.security.AccessController.doPrivileged(Native Method) at sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:599) at sun.misc.URLClassPath$JarLoader.(URLClassPath.java:583) at sun.misc.URLClassPath$3.run(URLClassPath.java:333) at java.security.AccessController.doPrivileged(Native Method) at sun.misc.URLClassPath.getLoader(URLClassPath.java:322) at sun.misc.URLClassPath.getLoader(URLClassPath.java:299) at sun.misc.URLClassPath.getResource(URLClassPath.java:168) at java.net.URLClassLoader$1.run(URLClassLoader.java:194) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:295) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) java.security.PrivilegedActionException at java.security.AccessController.doPrivileged(Native Method) at sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:599) at sun.misc.URLClassPath$JarLoader.(URLClassPath.java:583) at sun.misc.URLClassPath$3.run(URLClassPath.java:333) at java.security.AccessController.doPrivileged(Native Method) at sun.misc.URLClassPath.getLoader(URLClassPath.java:322) ... It's worth pointing out that this is not as useful as direct VM support for tracing exceptions. It has (at least) the following limitations: The trace is shown for every exception, whether it is thrown or not. It only applies to subclasses of java.lang.Exception as there appears to be bootstrap issues when the modification is applied to Throwable.java. It does not show you where the exception was caught. It involves overriding a class in rt.jar, something should never be done in a non-development environment.

    Read the article

  • Android "application stopped unexpectedly" - google Hello MapView Tutoria

    - by Cookie
    Hi, I'm trying the Hello MapView Tutorial at the moment. Whe I launch the program in the emulator, I get a huge number of errors (none of the exceptions seems to be related with lines in my code). The emulator window tells the program "stopped unexpectedly". Can anybody tell me which is the key line in the error output? What do I have to change? 05-02 15:04:57.195: ERROR/vold(26): Error opening switch name path '/sys/class/switch/test2' (No such file or directory) 05-02 15:04:57.195: ERROR/vold(26): Error bootstrapping switch '/sys/class/switch/test2' (No such file or directory) 05-02 15:04:57.195: ERROR/vold(26): Error opening switch name path '/sys/class/switch/test' (No such file or directory) 05-02 15:04:57.195: ERROR/vold(26): Error bootstrapping switch '/sys/class/switch/test' (No such file or directory) 05-02 15:05:10.659: ERROR/MemoryHeapBase(51): error opening /dev/pmem: No such file or directory 05-02 15:05:10.659: ERROR/SurfaceFlinger(51): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake 05-02 15:05:10.699: ERROR/libEGL(51): couldn't load <libhgl.so> library (Cannot load library: load_library[984]: Library 'libhgl.so' not found) 05-02 15:05:11.403: ERROR/libEGL(62): couldn't load <libhgl.so> library (Cannot load library: load_library[984]: Library 'libhgl.so' not found) 05-02 15:05:14.775: ERROR/BatteryService(51): Could not open '/sys/class/power_supply/usb/online' 05-02 15:05:14.775: ERROR/BatteryService(51): Could not open '/sys/class/power_supply/battery/batt_vol' 05-02 15:05:14.775: ERROR/BatteryService(51): Could not open '/sys/class/power_supply/battery/batt_temp' 05-02 15:05:15.148: ERROR/EventHub(51): could not get driver version for /dev/input/mouse0, Not a typewriter 05-02 15:05:15.148: ERROR/EventHub(51): could not get driver version for /dev/input/mice, Not a typewriter 05-02 15:05:15.282: ERROR/System(51): Failure starting core service 05-02 15:05:15.282: ERROR/System(51): java.lang.SecurityException 05-02 15:05:15.282: ERROR/System(51): at android.os.BinderProxy.transact(Native Method) 05-02 15:05:15.282: ERROR/System(51): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146) 05-02 15:05:15.282: ERROR/System(51): at android.os.ServiceManager.addService(ServiceManager.java:72) 05-02 15:05:15.282: ERROR/System(51): at com.android.server.ServerThread.run(SystemServer.java:162) 05-02 15:05:15.302: ERROR/AndroidRuntime(51): Crash logging skipped, no checkin service 05-02 15:05:17.012: ERROR/LockPatternKeyguardView(51): Failed to bind to GLS while checking for account 05-02 15:05:21.795: ERROR/ActivityThread(100): Failed to find provider info for com.google.settings 05-02 15:05:21.819: ERROR/ActivityThread(100): Failed to find provider info for com.google.settings 05-02 15:05:25.872: ERROR/ApplicationContext(51): Couldn't create directory for SharedPreferences file shared_prefs/wallpaper-hints.xml 05-02 15:05:28.923: ERROR/vold(26): Cannot start volume '/sdcard' (volume is not bound) 05-02 15:05:26.879: ERROR/ActivityThread(97): Failed to find provider info for android.server.checkin 05-02 15:05:30.211: ERROR/ActivityThread(97): Failed to find provider info for android.server.checkin 05-02 15:05:30.430: ERROR/ActivityThread(97): Failed to find provider info for android.server.checkin 05-02 15:05:32.463: ERROR/MediaPlayerService(30): Couldn't open fd for content://settings/system/notification_sound 05-02 15:05:32.489: ERROR/MediaPlayer(51): Unable to to create media player 05-02 15:05:34.783: ERROR/ActivityThread(51): Failed to find provider info for com.google.settings 05-02 15:05:34.783: ERROR/ActivityThread(51): Failed to find provider info for com.google.settings 05-02 15:05:35.359: ERROR/AndroidRuntime(201): Uncaught handler: thread main exiting due to uncaught exception 05-02 15:05:35.395: ERROR/AndroidRuntime(201): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{org.diretto.client.smartphone.android/org.diretto.client.smartphone.android.ShowMap}: java.lang.ClassNotFoundException: org.diretto.client.smartphone.android.ShowMap in loader dalvik.system.PathClassLoader@4376af90 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2324) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at android.app.ActivityThread.access$2100(ActivityThread.java:116) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at android.os.Handler.dispatchMessage(Handler.java:99) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at android.os.Looper.loop(Looper.java:123) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at android.app.ActivityThread.main(ActivityThread.java:4203) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at java.lang.reflect.Method.invokeNative(Native Method) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at java.lang.reflect.Method.invoke(Method.java:521) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at dalvik.system.NativeStart.main(Native Method) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): Caused by: java.lang.ClassNotFoundException: org.diretto.client.smartphone.android.ShowMap in loader dalvik.system.PathClassLoader@4376af90 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at java.lang.ClassLoader.loadClass(ClassLoader.java:573) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at java.lang.ClassLoader.loadClass(ClassLoader.java:532) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at android.app.Instrumentation.newActivity(Instrumentation.java:1097) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2316) 05-02 15:05:35.395: ERROR/AndroidRuntime(201): ... 11 more 05-02 15:05:35.527: ERROR/dalvikvm(201): Unable to open stack trace file '/data/anr/traces.txt': Permission denied

    Read the article

  • Android Get Image Uri from Camera

    - by josnidhin
    Hi I have an application that calls the android phone's default camera to take photo the following is my code. Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(intent, TAKE_PICTURE); and in the onActivityResult method I am doing the following if ((requestCode == TAKE_PICTURE) && (resultCode == Activity.RESULT_OK)) { Uri photoPath = intent.getData(); // do something with the uri here } The above code works fine on htc Tatto and Sony ericsson's x10 running 1.6 but in on htc G1 running 1.6 the above code causes the following exception 03-08 18:54:25.906: ERROR/AndroidRuntime(4344): Uncaught handler: thread main exiting due to uncaught exception 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { act=inline-data (has extras) }} to activity removed java.lang.NullPointerException 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at android.app.ActivityThread.deliverResults(ActivityThread.java:3224) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at android.app.ActivityThread.handleSendResult(ActivityThread.java:3266) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at android.app.ActivityThread.access$2600(ActivityThread.java:116) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1823) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at android.os.Handler.dispatchMessage(Handler.java:99) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at android.os.Looper.loop(Looper.java:123) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at android.app.ActivityThread.main(ActivityThread.java:4203) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at java.lang.reflect.Method.invokeNative(Native Method) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at java.lang.reflect.Method.invoke(Method.java:521) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at dalvik.system.NativeStart.main(Native Method) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): Caused by: java.lang.NullPointerException 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at removed 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at android.app.Activity.dispatchActivityResult(Activity.java:3624) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): at android.app.ActivityThread.deliverResults(ActivityThread.java:3220) 03-08 18:54:25.966: ERROR/AndroidRuntime(4344): ... 11 more Any insights into how to solve this problem. Thank you.

    Read the article

  • Javascript - jquery ajax post error driving me mad

    - by Exception Duck
    Can't seem to figure this one out. I have a web service defined as (c#,.net) [WebMethod] public string SubmitOrder(string sessionid, string lang,int invoiceno,string email,string emailcc) { //do stuff. return stuff; } Which works fine, when I test it from the autogenerated test thingy in Vstudio. But when I call it from jquery as $j.ajax({ type: "POST", url: "/wservice/baby.asmx/SubmitOrder", data: "{'sessionid' : '"+sessionid+"',"+ "'lang': '"+usersettings.Currlang+"',"+ "'invoiceno': '"+invoicenr+"',"+ "'email':'"+$j(orderids.txtOIEMAIL).val()+"',"+ "'emailcc':'"+$j(orderids.txtOICC).val()+"'}", contenttype: "application/json; charset=utf-8", datatype: "json", success: function (msg) { submitordercallback(msg); }, error: AjaxFailed }); I get this fun error: responseText: System.InvalidOperationException: Missing parameter: sessionid. at System.Web.Services.Protocols.ValueCollectionParameterReader.Read(NameValueCollection collection) at System.Web.Services.Protocols.HtmlFormParameterReader.Read(HttpRequest request) at System.Web.Services.Protocols.HttpServerProtocol.ReadParameters() at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest() data evaluates to: {'sessionid' : 'f61f8da737c046fea5633e7ec1f706dd','lang': 'SE','invoiceno': '11867','email':'[email protected]','emailcc':''} Ok, fair enough, but this function from jquery communicates fine with another webservice. Defined: c#: [WebMethod] public string CheckoutClicked(string sessionid,string lang) { //*snip* //jquery: var divCheckoutClicked = function() { $j.ajax({ type: "POST", url: "/wservice/baby.asmx/CheckoutClicked", data: "{'sessionid': '"+sessionid+"','lang': '"+usersettings.Currlang+"'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { divCheckoutClickedCallback(msg); }, error: AjaxFailed }); }

    Read the article

  • Selenium RC > how to upload file using attachFile()

    - by Saara
    hello, I am using Selenium RC with Junit framework. I am trying to upload a file using attachFile() method. attachFile: (Information collected from selenium API http://release.seleniumhq.org/selenium-remote-control/1.0-beta-2/doc/java/com/thoughtworks/selenium/Selenium.html#attachFile(java.lang.String,%20java.lang.String)) void attachFile(java.lang.String fieldLocator, java.lang.String fileLocator) Sets a file input (upload) field to the file listed in fileLocator Parameters: fieldLocator - an element locator fileLocator - a URL pointing to the specified file. Before the file can be set in the input field (fieldLocator), Selenium RC may need to transfer the file to the local machine before attaching the file in a web page form. This is common in selenium grid configurations where the RC server driving the browser is not the same machine that started the test. Supported Browsers: Firefox ("*chrome") only. Can anyone please tell me how to define "fileLocator". I am not getting which URL to be specify over here. Please give me an example if possible.

    Read the article

  • Why is it so difficult to get a working IDE for Scala?

    - by Alex R
    I recently gave up trying to use Scala in Eclipse (basic stuff like completion doesn't work). So now I'm trying IntelliJ. I'm not getting very far. This was the original error. See below for update: Scala signature Predef has wrong version Expected 5.0 found: 4.1 in .... scala-library.jar I tried both versions 2.7.6 and 2.8 RC1 of scala-*.jar, the result was the same. JDK is 1.6.u20. UPDATE Today I uninstalled IntelliJ 9.0.1, and installed 9.0.2 Early Availability, with the 4/14 stable version of the Scala plug-in. Then I setup a project from scratch through the wizards: new project from scratch JDK is 1.6.u20 accept the default (project) instead of global / module accept the download of Scala 2.8.0beta1 into project's lib folder Created a new class: object hello { def main(args: Array[String]) { println("hello: " + args); } } For my efforts, I now have a brand-new error :) Here it is: Scalac internal error: class java.lang.ClassNotFoundException [java.net.URLClassLoader$1.run(URLClassLoader.java:202), java.security.AccessController.doPrivileged(Native Method), java.net.URLClassLoader.findClass(URLClassLoader.java:190), java.lang.ClassLoader.loadClass(ClassLoader.java:307), sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301), java.lang.ClassLoader.loadClass(ClassLoader.java:248), java.lang.Class.forName0(Native Method), java.lang.Class.forName(Class.java:169), org.jetbrains.plugins.scala.compiler.rt.ScalacRunner.main(ScalacRunner.java:72)] Thanks

    Read the article

  • Eclipse Error On Startup

    - by GuyNoir
    Eclipse was running fine last night, but this morning I tried starting it up and I came upon this error: Here's the log !SESSION 2010-04-07 17:58:37.208 ----------------------------------------------- eclipse.buildId=I20080617-2000 java.version=1.6.0_13 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86 !ENTRY org.eclipse.osgi 4 0 2010-04-07 17:58:37.457 !MESSAGE Startup error !STACK 1 java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at org.eclipse.osgi.storagemanager.StorageManager.updateTable(StorageManager.java:512) at org.eclipse.osgi.storagemanager.StorageManager.open(StorageManager.java:694) at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initFileManager(BaseStorage.java:208) at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initialize(BaseStorage.java:142) at org.eclipse.osgi.baseadaptor.BaseAdaptor.initializeStorage(BaseAdaptor.java:124) at org.eclipse.osgi.framework.internal.core.Framework.initialize(Framework.java:180) at org.eclipse.osgi.framework.internal.core.Framework.<init>(Framework.java:152) at org.eclipse.osgi.framework.internal.core.OSGi.createFramework(OSGi.java:90) at org.eclipse.osgi.framework.internal.core.OSGi.<init>(OSGi.java:31) at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:286) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) Any help? I really need this up and running, and reinstalling and resetting all of my plugins and settings just isn't an option at the moment.

    Read the article

  • How to use Scala in IntelliJ IDEA (or: why is it so difficult to get a working IDE for Scala)?

    - by Alex R
    I recently gave up trying to use Scala in Eclipse (basic stuff like completion doesn't work). So now I'm trying IntelliJ. I'm not getting very far. I've been able to edit programs (within syntax highlighting and completion... yay!). But I'm unable to run even the simplest "Hello World". This was the original error: Scala signature Predef has wrong version Expected 5.0 found: 4.1 in .... scala-library.jar But that was yesterday with IDEA 9.0.1. See below... UPDATE Today I uninstalled IntelliJ 9.0.1, and installed 9.0.2 Early Availability, with the 4/14 stable version of the Scala plug-in. Then I setup a project from scratch through the wizards: new project from scratch JDK is 1.6.u20 accept the default (project) instead of global / module accept the download of Scala 2.8.0beta1 into project's lib folder Created a new class: object hello { def main(args: Array[String]) { println("hello: " + args); } } For my efforts, I now have a brand-new error :) Here it is: Scalac internal error: class java.lang.ClassNotFoundException [java.net.URLClassLoader$1.run(URLClassLoader.java:202), java.security.AccessController.doPrivileged(Native Method), java.net.URLClassLoader.findClass(URLClassLoader.java:190), java.lang.ClassLoader.loadClass(ClassLoader.java:307), sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301), java.lang.ClassLoader.loadClass(ClassLoader.java:248), java.lang.Class.forName0(Native Method), java.lang.Class.forName(Class.java:169), org.jetbrains.plugins.scala.compiler.rt.ScalacRunner.main(ScalacRunner.java:72)] FINAL UPDATE I uninstalled 9.0.2 EA and reinstalled 9.0.1, but this time went with the 2.7.3 version of Scala rather than the default 2.7.6, because 2.7.3 is the one shown in the screen-shots at the IntelliJ website (I guess the screen-shots prove that they actually tested this version!). Now everything works!!!

    Read the article

  • Kohana multi language website

    - by Sobek
    .I'm trying to set up a multi language website with kohana v3, following this tutorial: http://kerkness.ca/wiki/doku.php?id=example_of_a_multi-language_website Routing to a controller or action within i.e. website/controller/action seems to work as the url is properly redirected to website/lang/controller/action. However this is not working for ajax request calls. I have to manually edit the url with the appropriate language, to successfully retrieve the data. This also applies for anchors on the html page. In addition to this problem, the overflow parameter 'id' also doesn't work. It takes the 'lang' variable as its parameter. I have setup my default route just like in the tutorial i.e.: Route::set('default', '((<lang>)(/)(<controller>)(/<action>(/<id>)))', array('lang' => "({$langs_abr})",'id'=>'.+')) ->defaults(array('lang' => $default_lang,'controller' => welcome', 'action' => 'index')); Any help is much appreciated ! Cheers

    Read the article

  • Application stopped unexpectedly at launch

    - by Chris Stryker
    I've run this on a device and on the emulator. The app stops unexpectedly on both. I have not a clue what is wrong currently. It uses Google API Maps I compiled with Google Api 7. I followed this tutorial http://developer.android.com/guide/tutorials/views/hello-mapview.html (made some alterations clearly) I did use the correct API Key That the final apk is signed with This is the source(If you compile it shouldn't work as it is unsigned) This is the compiled signed apk Log 03-21 00:30:38.912: INFO/ActivityManager(54): Starting activity: Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=com.chris.stryker.worldly/.com.poppoob.WorldlyMap } 03-21 00:30:39.173: INFO/ActivityManager(54): Start proc com.chris.stryker.worldly for activity com.chris.stryker.worldly/.com.poppoob.WorldlyMap: pid=287 uid=10031 gids={3003, 1015} 03-21 00:30:39.532: DEBUG/ddm-heap(287): Got feature list request 03-21 00:30:40.185: WARN/dalvikvm(287): Unable to resolve superclass of Lcom/chris/stryker/worldly/com/poppoob/WorldlyMap; (17) 03-21 00:30:40.193: WARN/dalvikvm(287): Link of class 'Lcom/chris/stryker/worldly/com/poppoob/WorldlyMap;' failed 03-21 00:30:40.205: DEBUG/AndroidRuntime(287): Shutting down VM 03-21 00:30:40.223: WARN/dalvikvm(287): threadid=3: thread exiting with uncaught exception (group=0x4001b188) 03-21 00:30:40.223: ERROR/AndroidRuntime(287): Uncaught handler: thread main exiting due to uncaught exception 03-21 00:30:40.252: ERROR/AndroidRuntime(287): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.chris.stryker.worldly/com.chris.stryker.worldly.com.poppoob.WorldlyMap}: java.lang.ClassNotFoundException: com.chris.stryker.worldly.com.poppoob.WorldlyMap in loader dalvik.system.PathClassLoader@45a13938 03-21 00:30:40.252: ERROR/AndroidRuntime(287): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2417) 03-21 00:30:40.252: ERROR/AndroidRuntime(287): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512) 03-21 00:30:40.252: ERROR/AndroidRuntime(287): at android.app.ActivityThread.access$2200(ActivityThread.java:119) 03-21 00:30:40.252: ERROR/AndroidRuntime(287): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863) 03-21 00:30:40.252: ERROR/AndroidRuntime(287): at android.os.Handler.dispatchMessage(Handler.java:99) 03-21 00:30:40.252: ERROR/AndroidRuntime(287): at android.os.Looper.loop(Looper.java:123) 03-21 00:30:40.252: ERROR/AndroidRuntime(287): at android.app.ActivityThread.main(ActivityThread.java:4363) 03-21 00:30:40.252: ERROR/AndroidRuntime(287): at java.lang.reflect.Method.invokeNative(Native Method) 03-21 00:30:40.252: ERROR/AndroidRuntime(287): at java.lang.reflect.Method.invoke(Method.java:521) 03-21 00:30:40.252: ERROR/AndroidRuntime(287): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 03-21 00:30:40.252: ERROR/AndroidRuntime(287): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 03-21 00:30:40.252: ERROR/AndroidRuntime(287): at dalvik.system.NativeStart.main(Native Method) 03-21 00:30:40.252: ERROR/AndroidRuntime(287): Caused by: java.lang.ClassNotFoundException: com.chris.stryker.worldly.com.poppoob.WorldlyMap in loader dalvik.system.PathClassLoader@45a13938 03-21 00:30:40.252: ERROR/AndroidRuntime(287): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243) 03-21 00:30:40.252: ERROR/AndroidRuntime(287): at java.lang.ClassLoader.loadClass(ClassLoader.java:573) 03-21 00:30:40.252: ERROR/AndroidRuntime(287): at java.lang.ClassLoader.loadClass(ClassLoader.java:532) 03-21 00:30:40.252: ERROR/AndroidRuntime(287): at android.app.Instrumentation.newActivity(Instrumentation.java:1021) 03-21 00:30:40.252: ERROR/AndroidRuntime(287): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2409) 03-21 00:30:40.252: ERROR/AndroidRuntime(287): ... 11 more 03-21 00:30:40.300: INFO/Process(54): Sending signal. PID: 287 SIG: 3 03-21 00:30:40.312: INFO/dalvikvm(287): threadid=7: reacting to signal 3 03-21 00:30:40.396: INFO/dalvikvm(287): Wrote stack trace to '/data/anr/traces.txt' 03-21 00:30:49.002: WARN/ActivityManager(54): Launch timeout has expired, giving up wake lock! 03-21 00:30:49.685: WARN/ActivityManager(54): Activity idle timeout for HistoryRecord{458ab6d0 com.chris.stryker.worldly/.com.poppoob.WorldlyMap}

    Read the article

  • PHP/Java bridge problem

    - by Jack
    I am using tomcat 6 on windows. Here is the code I am testing. import java.io.ByteArrayOutputStream; import java.io.Closeable; import java.io.StringReader; import javax.script.Invocable; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; /** * Create and run THREAD_COUNT PHP threads, concurrently accessing a * shared resource. * * Create 5 script engines, passing each a shared resource allocated * from Java. Each script engine has to implement Runnable. * * Java accesses the Runnable script engine using * scriptEngine.getInterface() and calls thread.start() to invoke each * PHP Runnable implementations concurrently. */ class PhpThreads { public static final String runnable = new String("<?php\n" + "function run() {\n" + " $out = java_context()->getAttribute('sharedResource', 100);\n" + " $nr = (string)java_context()->getAttribute('nr', 100);\n" + " echo \"started thread: $nr\n\";\n" + " for($i=0; $i<100; $i++) {\n" + " $out->write(ord($nr));\n" + " java('java.lang.Thread')->sleep(1);\n" + " }\n" + "}\n" + "?>\n"); static final int THREAD_COUNT = 5; public static void main(String[] args) throws Exception { ScriptEngineManager manager = new ScriptEngineManager(); Thread threads[] = new Thread[THREAD_COUNT]; ScriptEngine engines[] = new ScriptEngine[THREAD_COUNT]; ByteArrayOutputStream sharedResource = new ByteArrayOutputStream(); StringReader runnableReader = new StringReader(runnable); // create THREAD_COUNT PHP threads for (int i=0; i<THREAD_COUNT; i++) { engines[i] = manager.getEngineByName("php-invocable"); if (engines[i] == null) throw new NullPointerException ("php script engine not found"); engines[i].put("nr", new Integer(i+1)); engines[i].put("sharedResource", sharedResource); engines[i].eval(runnableReader); runnableReader.reset(); // cast the whole script to Runnable; note also getInterface(specificClosure, type) Runnable r = (Runnable) ((Invocable)engines[i]).getInterface(Runnable.class); threads[i] = new Thread(r); } // run the THREAD_COUNT PHP threads for (int i=0; i<THREAD_COUNT; i++) { threads[i].start(); } // wait for the THREAD_COUNT PHP threads to finish for (int i=0; i<THREAD_COUNT; i++) { threads[i].join(); ((Closeable)engines[i]).close(); } // print the output generated by the THREAD_COUNT concurrent threads String result = sharedResource.toString(); System.out.println(result); // Check result Object res=manager.getEngineByName("php").eval( "<?php " + "exit((int)('10011002100310041005'!=" + "@system(\"echo -n "+result+"|sed 's/./&\\\n/g'|sort|uniq -c|tr -d ' \\\n'\")));" + "?>"); System.exit(((Number)res).intValue()); } } I have added all the libraries. When I run the file I get the following error - run: Exception in thread "main" javax.script.ScriptException: java.io.IOException: Cannot run program "php-cgi": CreateProcess error=2, The system cannot find the file specified at php.java.script.InvocablePhpScriptEngine.eval(InvocablePhpScriptEngine.java:209) at php.java.script.SimplePhpScriptEngine.eval(SimplePhpScriptEngine.java:178) at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:232) at PhpThreads.main(NewClass.java:53) Caused by: java.io.IOException: Cannot run program "php-cgi": CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(ProcessBuilder.java:459) at java.lang.Runtime.exec(Runtime.java:593) at php.java.bridge.Util$Process.start(Util.java:1064) at php.java.bridge.Util$ProcessWithErrorHandler.start(Util.java:1166) at php.java.bridge.Util$ProcessWithErrorHandler.start(Util.java:1217) at php.java.script.CGIRunner.doRun(CGIRunner.java:126) at php.java.script.HttpProxy.doRun(HttpProxy.java:63) at php.java.script.CGIRunner.run(CGIRunner.java:111) at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60) Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(ProcessImpl.java:81) at java.lang.ProcessImpl.start(ProcessImpl.java:30) at java.lang.ProcessBuilder.start(ProcessBuilder.java:452) ... 8 more What am I missing?

    Read the article

  • Error in loading component property (Swing GUI Forms)

    - by Christo Du Preez
    For no apparent reason all my Swing GUI forms using components linked to org.jdesktop.beansbinding.Converter started generating errors when trying to open the Design View: Error Error in loading component property: [JPanel]-filterTextField-converter. Cannot load property type class org.jdesktop.beansbinding.Converter. The property cannot be loaded. Errors occurred in loading... I'm currently using Netbeans 6.8. I opened my project in Netbeans 6.7.1 and all was fine but after a while the same thing happened. Looking at the .form and .java files and comparing it to previous backups, everything looks fine. Even my Netbeans tutorial project no longer works. What can cause this. Any suggestions would greatly be appreciated. After further investigation this is taken from my IDE's log : INFO: msg org.openide.ErrorManager$AnnException: msg at org.openide.ErrorManager$AnnException.findOrCreate(ErrorManager.java:867) at org.openide.ErrorManager$DelegatingErrorManager.annotate(ErrorManager.java:650) at org.netbeans.modules.form.GandalfPersistenceManager.annotateException(GandalfPersistenceManager.java:230) at org.netbeans.modules.form.GandalfPersistenceManager.annotateException(GandalfPersistenceManager.java:240) at org.netbeans.modules.form.GandalfPersistenceManager.getPropertyType(GandalfPersistenceManager.java:2362) at org.netbeans.modules.form.GandalfPersistenceManager.loadProperty(GandalfPersistenceManager.java:2041) at org.netbeans.modules.form.GandalfPersistenceManager.loadBindingProperties(GandalfPersistenceManager.java:2627) at org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:900) at org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:845) at org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:979) at org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:845) at org.netbeans.modules.form.GandalfPersistenceManager.loadNonVisuals(GandalfPersistenceManager.java:695) at org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:529) at org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:290) at org.netbeans.modules.form.FormEditor$3.run(FormEditor.java:339) at org.netbeans.modules.form.FormLAF$2.run(FormLAF.java:287) at org.openide.util.Mutex.doEventAccess(Mutex.java:1355) at org.openide.util.Mutex.readAccess(Mutex.java:317) at org.netbeans.modules.form.FormLAF.executeWithLookAndFeel(FormLAF.java:272) at org.netbeans.modules.form.FormEditor.loadFormData(FormEditor.java:337) at org.netbeans.modules.form.FormEditor.loadForm(FormEditor.java:266) at org.netbeans.modules.form.FormEditorSupport.loadForm(FormEditorSupport.java:306) at org.netbeans.modules.form.FormEditorSupport$3.run(FormEditorSupport.java:457) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:125) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Caused by: java.lang.ClassNotFoundException: Will not load class org.jdesktop.beansbinding.Converter arbitrarily from one of ModuleCL@738d08[org.jdesktop.beansbinding] and ModuleCL@167e3a5[javax.beans.binding] starting from SystemClassLoader[556 modules]; see http://wiki.netbeans.org/DevFaqModuleCCE at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:241) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.netbeans.modules.form.project.FormClassLoader.findClass(FormClassLoader.java:83) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.netbeans.modules.form.project.ClassPathUtils.loadClass(ClassPathUtils.java:95) at org.netbeans.modules.form.FormUtils.loadClass(FormUtils.java:1445) at org.netbeans.modules.form.PersistenceObjectRegistry.loadClass(PersistenceObjectRegistry.java:95) at org.netbeans.modules.form.GandalfPersistenceManager.getClassFromString(GandalfPersistenceManager.java:5516) at org.netbeans.modules.form.GandalfPersistenceManager.getPropertyType(GandalfPersistenceManager.java:2348) ... 27 more msg Error in loading component property: Other Components-mainPanel-jTextField1-converter Cannot load property type class org.jdesktop.beansbinding.Converter. The property cannot be loaded. Can someone please help me with this issue. This is still not resolved and not being able to edit my Forms or loosing binding properties every time I need to edit a Form is a real pain and time consuming! Any help would greatly be appreciated. Thanx.

    Read the article

  • Problem to display a pdf from my JSF Portlet of Liferay

    - by Stefano
    I use liferay 5.2 with jsf-portlet. From the page I want to press a button to generate one PDF. In managedbean i build pdf and I want to show it in response. In a ByteArrayOutputStream named outputStream i have my pdf built with JasperReport. I write: PortletResponse portletResponse = (PortletResponse)externalCtx.getResponse(); HttpServletResponse httpResponse = PortalUtil.getHttpServletResponse(portletResponse); ServletOutputStream out = httpResponse.getOutputStream(); String filename="Pdf" + System.currentTimeMillis()+".pdf"; httpResponse.reset(); httpResponse.setContentType("application/pdf"); httpResponse.setHeader("Content-Disposition", "attachment; filename=\""+ filename + "\""); httpResponse.setContentLength(outputStream.size()); outputStream.writeTo(out); out.flush(); out.close(); I do not see anything output! In jboss log i read: IllegaStateException.... What is wrong? LOG 11:03:19,716 INFO [STDOUT] 11:03:19,716 ERROR [IncludeTag] Current URL /web/organo-di-governo/datawarehouse?p_p_id=1_WAR_Portlet_Datawarehouse_INSTANCE_D7s7&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-2&p_p_col_count=1&_1_WAR_Portlet_Datawarehouse_INSTANCE_D7s7_com.sun.faces.portlet.VIEW_ID=%2Fview.xhtml&_1_WAR_Portlet_Datawarehouse_INSTANCE_D7s7_com.sun.faces.portlet.NAME_SPACE=_1_WAR_Portlet_Datawarehouse_INSTANCE_D7s7_ generates exception: null 11:03:19,717 INFO [STDOUT] 11:03:19,717 ERROR [IncludeTag] java.lang.IllegalStateException at com.liferay.portal.servlet.filters.strip.StripResponse.getWriter(StripResponse.java:85) at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118) at org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:326) at org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:342) at org.apache.jasper.runtime.JspWriterImpl.print(JspWriterImpl.java:468) at com.liferay.taglib.util.ThemeUtil.includeVM(ThemeUtil.java:208) at com.liferay.taglib.util.ThemeUtil.include(ThemeUtil.java:68) at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:59) at org.apache.jsp.html.common.themes.portal_jsp._jspx_meth_liferay_002dtheme_005finclude_005f1(portal_jsp.java:816) at org.apache.jsp.html.common.themes.portal_jsp._jspx_meth_c_005fotherwise_005f0(portal_jsp.java:788) at org.apache.jsp.html.common.themes.portal_jsp._jspService(portal_jsp.java:724) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 11:03:19,718 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException 11:03:19,719 ERROR [[Main Servlet]] Servlet.service() for servlet Main Servlet threw exception java.lang.IllegalStateException at com.liferay.portal.servlet.filters.strip.StripResponse.getWriter(StripResponse.java:85) at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118) 11:03:19,722 INFO [STDOUT] 11:03:19,720 ERROR [OpenSSOFilter] org.apache.jasper.JasperException: java.lang.IllegalStateException org.apache.jasper.JasperException: java.lang.IllegalStateException at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:521) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:409) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) 11:03:19,722 INFO [STDOUT] n.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) Caused by: java.lang.IllegalStateException at com.liferay.portal.servlet.filters.strip.StripResponse.getWriter(StripResponse.java:85) at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125) at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118)

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >