Search Results

Search found 2343 results on 94 pages for 'masterchris 99'.

Page 78/94 | < Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >

  • After HTTP GET request, the resulting string is cut-off - content has been consumed

    - by Jayomat
    hi all, I'm making a http get request like this: try { HttpClient client = new DefaultHttpClient(); String getURL = "http://busspur02.aseag.de/bs.exe?SID=5FC39&ScreenX=1440&ScreenY=900&CMD=CR&Karten=true&DatumT="+day+"&DatumM="+month+"&DatumJ="+year+"&ZeitH="+hour+"&ZeitM="+min+"&Intervall=60&Suchen=(S)uchen&GT0=Aachen&T0=H&HT0="+start_from+"&GT1=Aachen&T0=H&HT1="+destination+""; HttpGet get = new HttpGet(getURL); HttpResponse responseGet = client.execute(get); HttpEntity resEntityGet = responseGet.getEntity(); if (resEntityGet != null) { //do something with the response Log.i("GET RESPONSE",EntityUtils.toString(resEntityGet)); } ........ It all works well... the only problem: the output from Log.i is cut-off... It's not the complete html page. If I make the same request in a browser, I get 3x the output in opposition to making the request in the emulator and using the above code.... what's wrong? ERROR: 04-30 14:01:01.287: WARN/System.err(1088): java.lang.IllegalStateException: Content has been consumed 04-30 14:01:01.297: WARN/System.err(1088): at org.apache.http.entity.BasicHttpEntity.getContent(BasicHttpEntity.java:84) 04-30 14:01:01.297: WARN/System.err(1088): at org.apache.http.conn.BasicManagedEntity.getContent(BasicManagedEntity.java:100) 04-30 14:01:01.307: WARN/System.err(1088): at org.apache.http.util.EntityUtils.toString(EntityUtils.java:112) 04-30 14:01:01.307: WARN/System.err(1088): at org.apache.http.util.EntityUtils.toString(EntityUtils.java:146) 04-30 14:01:01.307: WARN/System.err(1088): at mjb.project.AVV.ParseHTML.start(ParseHTML.java:177) 04-30 14:01:01.307: WARN/System.err(1088): at mjb.project.AVV.ParseHTML.onCreate(ParseHTML.java:139) 04-30 14:01:01.307: WARN/System.err(1088): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 04-30 14:01:01.327: WARN/System.err(1088): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459) 04-30 14:01:01.327: WARN/System.err(1088): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512) 04-30 14:01:01.327: WARN/System.err(1088): at android.app.ActivityThread.access$2200(ActivityThread.java:119) 04-30 14:01:01.347: WARN/System.err(1088): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863) 04-30 14:01:01.347: WARN/System.err(1088): at android.os.Handler.dispatchMessage(Handler.java:99) 04-30 14:01:01.347: WARN/System.err(1088): at android.os.Looper.loop(Looper.java:123) 04-30 14:01:01.347: WARN/System.err(1088): at android.app.ActivityThread.main(ActivityThread.java:4363) 04-30 14:01:01.347: WARN/System.err(1088): at java.lang.reflect.Method.invokeNative(Native Method) 04-30 14:01:01.357: WARN/System.err(1088): at java.lang.reflect.Method.invoke(Method.java:521) 04-30 14:01:01.357: WARN/System.err(1088): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 04-30 14:01:01.357: WARN/System.err(1088): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 04-30 14:01:01.357: WARN/System.err(1088): at dalvik.system.NativeStart.main(Native Method )

    Read the article

  • UITabBarContrtoller achieve from a different class in iPhone

    - by baluedo
    Hi! I have the following problem: There is a class that includes five tabs in the following way: mainMenuClient.h #import <UIKit/UIKit.h> @interface MainMenuClient : UIViewController { UITabBarController *tabBarController; } @property (nonatomic, retain) UITabBarController *tabBarController; @end mainMenuClient.m -(void)viewDidLoad { UIView *contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; contentView.backgroundColor = [UIColor blackColor]; self.view = contentView; [contentView release]; ContactListTab *contactTab = [[ContactListTab alloc] init]; ChatTab *chat = [[ChatTab alloc]init]; DialerTab *dialer = [[DialerTab alloc]init]; MenuTab *menu = [[MenuTab alloc]init]; TesztingFile *teszting = [[TesztingFile alloc]init]; contactTab.title = @"Contact List"; chat.title = @"Chat"; dialer.title = @"Dialer"; menu.title = @"Menu"; teszting.title = @"TesztTab"; contactTab.tabBarItem.image = [UIImage imageNamed:@"Contacts_icon.png"]; chat.tabBarItem.image = [UIImage imageNamed:@"Chat_icon.png"]; dialer.tabBarItem.image = [UIImage imageNamed:@"Dialer_icon.png"]; menu.tabBarItem.image = [UIImage imageNamed:@"Menu_icon.png"]; teszting.tabBarItem.image = [UIImage imageNamed:@"Contacts_icon.png"]; chat.tabBarItem.badgeValue = @"99"; tabBarController = [[UITabBarController alloc]init]; tabBarController.view.frame = CGRectMake(0, 0, 320, 460); [tabBarController setViewControllers:[NSArray arrayWithObjects:contactTab, chat, dialer, menu, teszting, nil]]; [contactTab release]; [chat release]; [dialer release]; [menu release]; [teszting release]; [self.view addSubview:tabBarController.view]; [super viewDidLoad]; } In the contactTab class there are a UITableViewController. contactTab.h - (void)updateCellData; - (void)configureCell:(UITableViewCell *)cell forIndexPath:(NSIndexPath *)indexPath; There is a third class, which I would like to achieve is a method of UITableViewController's (from ContactTab). So far I tried this: When I tried to achieve the UItabbarController: MainMenuClient *menu; UITabBarController *tabBarControllerchange = [[UITabBarController alloc] init]; tabBarControllerchange = menu.tabBarController; [tabBarControllerchange setSelectedIndex:0]; When I tried to achieve the UITableViewController: ContactListTab *contactListTab; [contactListTab updateCellData]; Does anybody have an idea for this problem? Thanks. Balazs.

    Read the article

  • how to implement add item in spinner array adapter in android

    - by narasimha
    hi folks, i had a EditText , a button and a spinner . When click the button , the spinner will add a new item with name you entered in the EditText. But here is the question, my adapter.add() method seems doesn't work...here is my code: bt1 = (Button)this.findViewById(R.id.AddBtn); et = (EditText)this.findViewById(R.id.newSpinnerItemText); spinner = (Spinner)this.findViewById(R.id.dynamicSpinner); adapter = ArrayAdapter.createFromResource( this, R.array.simple_from_length, android.R.layout.simple_spinner_item); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinner.setAdapter(adapter); bt1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String temp = et.getText().toString(); adapter.add(temp); // adapter.notifyDataSetChanged(); spinner.setAdapter(adapter); } }); error of this file: 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): java.lang.UnsupportedOperationException 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at java.util.AbstractList.add(AbstractList.java:410) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at java.util.AbstractList.add(AbstractList.java:432) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at android.widget.ArrayAdapter.add(ArrayAdapter.java:178) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at org.example.SpinnerKiran.SpinnerKiran$1.onClick(SpinnerKiran.java:56) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at android.view.View.performClick(View.java:2179) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at android.view.View.onTouchEvent(View.java:3828) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at android.widget.TextView.onTouchEvent(TextView.java:6291) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at android.view.View.dispatchTouchEvent(View.java:3368) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:863) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1707) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1197) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at android.app.Activity.dispatchTouchEvent(Activity.java:1993) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1691) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at android.view.ViewRoot.handleMessage(ViewRoot.java:1525) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at android.os.Handler.dispatchMessage(Handler.java:99) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at android.os.Looper.loop(Looper.java:123) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at android.app.ActivityThread.main(ActivityThread.java:3948) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at java.lang.reflect.Method.invokeNative(Native Method) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at java.lang.reflect.Method.invoke(Method.java:521) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) 02-27 18:01:17.728: ERROR/AndroidRuntime(1982): at dalvik.system.NativeStart.main(Native Method)

    Read the article

  • Dynamic data-entry value store

    - by simendsjo
    I'm creating a data-entry application where users are allowed to create the entry schema. My first version of this just created a single table per entry schema with each entry spanning a single or multiple columns (for complex types) with the appropriate data type. This allowed for "fast" querying (on small datasets as I didn't index all columns) and simple synchronization where the data-entry was distributed on several databases. I'm not quite happy with this solution though; the only positive thing is the simplicity... I can only store a fixed number of columns. I need to create indexes on all columns. I need to recreate the table on schema changes. Some of my key design criterias are: Very fast querying (Using a simple domain specific query language) Writes doesn't have to be fast Many concurrent users Schemas will change often Schemas might contain many thousand columns The data-entries might be distributed and needs syncronization. Preferable MySQL and SQLite - Databases like DB2 and Oracle is out of the question. Using .Net/Mono I've been thinking of a couple of possible designs, but none of them seems like a good choice. Solution 1: Union like table containing a Type column and one nullable column per type. This avoids joins, but will definitly use a lot of space. Solution 2: Key/value store. All values are stored as string and converted when needed. Also use a lot of space, and of course, I hate having to convert everything to string. Solution 3: Use an xml database or store values as xml. Without any experience I would think this is quite slow (at least for the relational model unless there is some very good xpath support). I also would like to avoid an xml database as other parts of the application fits better as a relational model, and being able to join the data is helpful. I cannot help to think that someone has solved (some of) this already, but I'm unable to find anything. Not quite sure what to search for either... I know market research is doing something like this for their questionnaires, but there are few open source implementations, and the ones I've found doesn't quite fit the bill. PSPP has much of the logic I'm thinking of; primitive column types, many columns, many rows, fast querying and merging. Too bad it doesn't work against a database.. And of course... I don't need 99% of the provided functionality, but a lot of stuff not included. I'm not sure this is the right place to ask such a design related question, but I hope someone here has some tips, know of any existing work, or can point me to a better place to ask such a question. Thanks in advance!

    Read the article

  • LINQ Query Returning Multiple Copies Of First Result

    - by Mike G
    I'm trying to figure out why a simple query in LINQ is returning odd results. I have a view defined in the database. It basically brings together several other tables and does some data munging. It really isn't anything special except for the fact that it deals with a large data set and can be a bit slow. I want to query this view based on a long. Two sample queries below show different queries to this view. var la = Runtime.OmsEntityContext.Positions.Where(p => p.AccountNumber == 12345678).ToList(); var deDa = Runtime.OmsEntityContext.Positions.Where(p => p.AccountNumber == 12345678).Select(p => new { p.AccountNumber, p.SecurityNumber, p.CUSIP }).ToList(); The first one should hand back a List. The second one will be a list of anonymous objects. When I do these queries in entities framework the first one will hand me back a list of results where they're all exactly the same. The second query will hand me back data where the account number is the one that I queried and the other values differ. This seems to do this on a per account number basis, ie if I were to query for one account number or another all the Position objects for one account would have the same value (the first one in the list of Positions for that account) and the second account would have a set of Position objects that all had the same value (again, the first one in it's list of Position objects). I can write SQL that is in effect the same as either of the two EF queries. They both come back with results (say four) that show the correct data, one account number with different securities numbers. Why does this happen??? Is there something that I could be doing wrong so that if I had four results for the first query above that the first record's data also appears in the 2-4th's objects??? I cannot fathom what would/could be causing this. I've searched Google for all kinds of keywords and haven't seen anyone with this issue. We partial class out the Positions class for added functionality (smart object) and some smart properties. There are even some constructors that provide some view model type support. None of this is invoked in the request (I'm 99% sure of this). However, we do this same pattern all over the app. The only thing I can think of is that the mapping in the EDMX is screwy. Is there a way that this would happen if the "primary keys" in the EDMX were not in fact unique given the way the view is constructed? I'm thinking that the dev who imported this model into the EDMX let the designer auto select what would be unique. Any help would give a haggered dev some hope!

    Read the article

  • Issue accessing remote Infinispan mbeans

    - by user1960172
    I am able to access the Mbeans by local Jconsole but not able to access the MBEANS from a remote Host. My COnfiguration: <?xml version='1.0' encoding='UTF-8'?> <server xmlns="urn:jboss:domain:1.4"> <extensions> <extension module="org.infinispan.server.endpoint"/> <extension module="org.jboss.as.clustering.infinispan"/> <extension module="org.jboss.as.clustering.jgroups"/> <extension module="org.jboss.as.connector"/> <extension module="org.jboss.as.jdr"/> <extension module="org.jboss.as.jmx"/> <extension module="org.jboss.as.logging"/> <extension module="org.jboss.as.modcluster"/> <extension module="org.jboss.as.naming"/> <extension module="org.jboss.as.remoting"/> <extension module="org.jboss.as.security"/> <extension module="org.jboss.as.threads"/> <extension module="org.jboss.as.transactions"/> <extension module="org.jboss.as.web"/> </extensions> <management> <security-realms> <security-realm name="ManagementRealm"> <authentication> <local default-user="$local"/> <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/> </authentication> </security-realm> <security-realm name="ApplicationRealm"> <authentication> <local default-user="$local" allowed-users="*"/> <properties path="application-users.properties" relative-to="jboss.server.config.dir"/> </authentication> </security-realm> </security-realms> <management-interfaces> <native-interface security-realm="ManagementRealm"> <socket-binding native="management-native"/> </native-interface> <http-interface security-realm="ManagementRealm"> <socket-binding http="management-http"/> </http-interface> </management-interfaces> </management> <profile> <subsystem xmlns="urn:jboss:domain:logging:1.2"> <console-handler name="CONSOLE"> <level name="INFO"/> <formatter> <pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/> </formatter> </console-handler> <periodic-rotating-file-handler name="FILE" autoflush="true"> <formatter> <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/> </formatter> <file relative-to="jboss.server.log.dir" path="server.log"/> <suffix value=".yyyy-MM-dd"/> <append value="true"/> </periodic-rotating-file-handler> <logger category="com.arjuna"> <level name="WARN"/> </logger> <logger category="org.apache.tomcat.util.modeler"> <level name="WARN"/> </logger> <logger category="org.jboss.as.config"> <level name="DEBUG"/> </logger> <logger category="sun.rmi"> <level name="WARN"/> </logger> <logger category="jacorb"> <level name="WARN"/> </logger> <logger category="jacorb.config"> <level name="ERROR"/> </logger> <root-logger> <level name="INFO"/> <handlers> <handler name="CONSOLE"/> <handler name="FILE"/> </handlers> </root-logger> </subsystem> <subsystem xmlns="urn:infinispan:server:endpoint:6.0"> <hotrod-connector socket-binding="hotrod" cache-container="clustered"> <topology-state-transfer lazy-retrieval="false" lock-timeout="1000" replication-timeout="5000"/> </hotrod-connector> <memcached-connector socket-binding="memcached" cache-container="clustered"/> <!--<rest-connector virtual-server="default-host" cache-container="clustered" security-domain="other" auth-method="BASIC"/> --> <rest-connector virtual-server="default-host" cache-container="clustered" /> <websocket-connector socket-binding="websocket" cache-container="clustered"/> </subsystem> <subsystem xmlns="urn:jboss:domain:datasources:1.1"> <datasources/> </subsystem> <subsystem xmlns="urn:infinispan:server:core:5.3" default-cache-container="clustered"> <cache-container name="clustered" default-cache="default"> <transport executor="infinispan-transport" lock-timeout="60000"/> <distributed-cache name="default" mode="SYNC" segments="20" owners="2" remote-timeout="30000" start="EAGER"> <locking isolation="READ_COMMITTED" acquire-timeout="30000" concurrency-level="1000" striping="false"/> <transaction mode="NONE"/> </distributed-cache> <distributed-cache name="memcachedCache" mode="SYNC" segments="20" owners="2" remote-timeout="30000" start="EAGER"> <locking isolation="READ_COMMITTED" acquire-timeout="30000" concurrency-level="1000" striping="false"/> <transaction mode="NONE"/> </distributed-cache> <distributed-cache name="namedCache" mode="SYNC" start="EAGER"/> </cache-container> <cache-container name="security"/> </subsystem> <subsystem xmlns="urn:jboss:domain:jca:1.1"> <archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/> <bean-validation enabled="true"/> <default-workmanager> <short-running-threads> <core-threads count="50"/> <queue-length count="50"/> <max-threads count="50"/> <keepalive-time time="10" unit="seconds"/> </short-running-threads> <long-running-threads> <core-threads count="50"/> <queue-length count="50"/> <max-threads count="50"/> <keepalive-time time="10" unit="seconds"/> </long-running-threads> </default-workmanager> <cached-connection-manager/> </subsystem> <subsystem xmlns="urn:jboss:domain:jdr:1.0"/> <subsystem xmlns="urn:jboss:domain:jgroups:1.2" default-stack="${jboss.default.jgroups.stack:udp}"> <stack name="udp"> <transport type="UDP" socket-binding="jgroups-udp"/> <protocol type="PING"/> <protocol type="MERGE2"/> <protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/> <protocol type="FD_ALL"/> <protocol type="pbcast.NAKACK"/> <protocol type="UNICAST2"/> <protocol type="pbcast.STABLE"/> <protocol type="pbcast.GMS"/> <protocol type="UFC"/> <protocol type="MFC"/> <protocol type="FRAG2"/> <protocol type="RSVP"/> </stack> <stack name="tcp"> <transport type="TCP" socket-binding="jgroups-tcp"/> <!--<protocol type="MPING" socket-binding="jgroups-mping"/>--> <protocol type="TCPPING"> <property name="initial_hosts">10.32.50.53[7600],10.32.50.64[7600]</property> </protocol> <protocol type="MERGE2"/> <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/> <protocol type="FD"/> <protocol type="VERIFY_SUSPECT"/> <protocol type="pbcast.NAKACK"> <property name="use_mcast_xmit">false</property> </protocol> <protocol type="UNICAST2"/> <protocol type="pbcast.STABLE"/> <protocol type="pbcast.GMS"/> <protocol type="UFC"/> <protocol type="MFC"/> <protocol type="FRAG2"/> <protocol type="RSVP"/> </stack> </subsystem> <subsystem xmlns="urn:jboss:domain:jmx:1.1"> <show-model value="true"/> <remoting-connector use-management-endpoint="false"/> </subsystem> <subsystem xmlns="urn:jboss:domain:modcluster:1.1"> <mod-cluster-config advertise-socket="modcluster" connector="ajp" excluded-contexts="console"> <dynamic-load-provider> <load-metric type="busyness"/> </dynamic-load-provider> </mod-cluster-config> </subsystem> <subsystem xmlns="urn:jboss:domain:naming:1.2"/> <subsystem xmlns="urn:jboss:domain:remoting:1.1"> <connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/> </subsystem> <subsystem xmlns="urn:jboss:domain:security:1.2"> <security-domains> <security-domain name="other" cache-type="infinispan"> <authentication> <login-module code="Remoting" flag="optional"> <module-option name="password-stacking" value="useFirstPass"/> </login-module> <login-module code="RealmUsersRoles" flag="required"> <module-option name="usersProperties" value="${jboss.server.config.dir}/application-users.properties"/> <module-option name="rolesProperties" value="${jboss.server.config.dir}/application-roles.properties"/> <module-option name="realm" value="ApplicationRealm"/> <module-option name="password-stacking" value="useFirstPass"/> </login-module> </authentication> </security-domain> <security-domain name="jboss-web-policy" cache-type="infinispan"> <authorization> <policy-module code="Delegating" flag="required"/> </authorization> </security-domain> </security-domains> </subsystem> <subsystem xmlns="urn:jboss:domain:threads:1.1"> <thread-factory name="infinispan-factory" group-name="infinispan" priority="5"/> <unbounded-queue-thread-pool name="infinispan-transport"> <max-threads count="25"/> <keepalive-time time="0" unit="milliseconds"/> <thread-factory name="infinispan-factory"/> </unbounded-queue-thread-pool> </subsystem> <subsystem xmlns="urn:jboss:domain:transactions:1.2"> <core-environment> <process-id> <uuid/> </process-id> </core-environment> <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/> <coordinator-environment default-timeout="300"/> </subsystem> <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false"> <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/> <connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/> <virtual-server name="default-host" enable-welcome-root="false"> <alias name="localhost"/> <alias name="example.com"/> </virtual-server> </subsystem> </profile> <interfaces> <interface name="management"> <inet-address value="${jboss.bind.address.management:10.32.222.111}"/> </interface> <interface name="public"> <inet-address value="${jboss.bind.address:10.32.222.111}"/> </interface> </interfaces> <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}"> <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/> <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/> <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/> <socket-binding name="ajp" port="8089"/> <socket-binding name="hotrod" port="11222"/> <socket-binding name="http" port="8080"/> <socket-binding name="https" port="8443"/> <socket-binding name="jgroups-mping" port="0" multicast-address="${jboss.default.multicast.address:234.99.54.14}" multicast-port="45700"/> <socket-binding name="jgroups-tcp" port="7600"/> <socket-binding name="jgroups-tcp-fd" port="57600"/> <socket-binding name="jgroups-udp" port="55200" multicast-address="${jboss.default.multicast.address:234.99.54.14}" multicast-port="45688"/> <socket-binding name="jgroups-udp-fd" port="54200"/> <socket-binding name="memcached" port="11211"/> <socket-binding name="modcluster" port="0" multicast-address="224.0.1.115" multicast-port="23364"/> <socket-binding name="remoting" port="4447"/> <socket-binding name="txn-recovery-environment" port="4712"/> <socket-binding name="txn-status-manager" port="4713"/> <socket-binding name="websocket" port="8181"/> </socket-binding-group> </server> Remote Process: service:jmx:remoting-jmx://10.32.222.111:4447 I added user to both management and application realm admin=2a0923285184943425d1f53ddd58ec7a test=2b1be81e1da41d4ea647bd82fc8c2bc9 But when i try to connect its says's: Connection failed: Retry When i use Remote process as:10.32.222.111:4447 on the sever it prompts a warning : 16:29:48,084 ERROR [org.jboss.remoting.remote.connection] (Remoting "djd7w4r1" read-1) JBREM000200: Remote connection failed: java.io.IOException: Received an invali d message length of -2140864253 Also disabled Remote authentication: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=12345 Still not able to connect. Any help will be highly appreciated . Thanks

    Read the article

  • how i can use SAX parser

    - by moustafa
    This is what the result should look like when i parse it through a SAX parser http://img13.imageshack.us/img13/6950/75914446.jpg This is the XML source code from which i need to generate the display: <orders> <order> <count>37</count> <price>49.99</price> <book> <isbn>0130897930</isbn> <title>Core Web Programming Second Edition</title> <authors> <count>2</count> <author>Marty Hall</author> <author>Larry Brown</author> </authors> </book> </order> <order> <count>1</count> <price>9.95</price> <yacht> <manufacturer>Luxury Yachts, Inc.</manufacturer> <model>M-1</model> <standardFeatures oars="plastic" lifeVests="none">false</standardFeatures> </yacht> </order> <order> <count>3</count> <price>22.22</price> <book> <isbn>B000059Z4H</isbn> <title>Harry Potter and the Order of the Phoenix</title> <authors> <count>1</count> <author>J.K. Rowling</author> </authors> </book> </order> i really have no clue how to code the functions but i have just set up the parser $xmlParser = xml_parser_create("UTF-8"); xml_parser_set_option($xmlParser, XML_OPTION_CASE_FOLDING, false); xml_set_element_handler($xmlParser, 'startElement', 'endElement'); xml_set_character_data_handler($xmlParser, 'HandleCharacterData'); $fileName = 'orders.xml'; if (!($fp = fopen($fileName, 'r'))){ die('Cannot open the XML file: ' . $fileName); } while ($data = fread($fp, 4096)){ $parsedOkay = xml_parse($xmlParser, $data, feof($fp)); if (!$parsedOkay){ print ("There was an error or the parser was finished."); break; } } xml_parser_free($xmlParser); function startElement($xmlParser, $name, $attribs) { } function endElement($parser, $name) { } function HandleCharacterData($parser, $data) { }

    Read the article

  • ArrayAdapter throwing ArrayIndexOutOfBoundsException

    - by alex
    I am getting an error of an array out of bounce error when i am using my custom array adapter. I am wondering if there are any coding errors I have overlooked. Here is the error log 06-10 20:21:53.254: E/AndroidRuntime(315): FATAL EXCEPTION: main 06-10 20:21:53.254: E/AndroidRuntime(315): java.lang.RuntimeException: Unable to start activity ComponentInfo{alex.android.galaxy.tab.latest/alex.android.galaxy.tab.latest.Basic_db_output}: java.lang.ArrayIndexOutOfBoundsException 06-10 20:21:53.254: E/AndroidRuntime(315): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) 06-10 20:21:53.254: E/AndroidRuntime(315): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 06-10 20:21:53.254: E/AndroidRuntime(315): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 06-10 20:21:53.254: E/AndroidRuntime(315): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 06-10 20:21:53.254: E/AndroidRuntime(315): at android.os.Handler.dispatchMessage(Handler.java:99) 06-10 20:21:53.254: E/AndroidRuntime(315): at android.os.Looper.loop(Looper.java:123) 06-10 20:21:53.254: E/AndroidRuntime(315): at android.app.ActivityThread.main(ActivityThread.java:4627) 06-10 20:21:53.254: E/AndroidRuntime(315): at java.lang.reflect.Method.invokeNative(Native Method) 06-10 20:21:53.254: E/AndroidRuntime(315): at java.lang.reflect.Method.invoke(Method.java:521) 06-10 20:21:53.254: E/AndroidRuntime(315): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 06-10 20:21:53.254: E/AndroidRuntime(315): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 06-10 20:21:53.254: E/AndroidRuntime(315): at dalvik.system.NativeStart.main(Native Method) 06-10 20:21:53.254: E/AndroidRuntime(315): Caused by: java.lang.ArrayIndexOutOfBoundsException 06-10 20:21:53.254: E/AndroidRuntime(315): at alex.android.galaxy.tab.latest.Basic_db_output.onCreate(Basic_db_output.java:44) 06-10 20:21:53.254: E/AndroidRuntime(315): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 06-10 20:21:53.254: E/AndroidRuntime(315): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) I am basing my code example on this How to use ArrayAdapter<myClass> ArrayList list = new ArrayList(); for(int i=1; i <= 3; i++) { Reader reader = new ResultsReader("android_galaxy_tab_latest/src/quiz"+i+".txt"); reader.read(); String str = ((ResultsReader)reader).getInput(); String data[] = str.split("<.>"); Question q = new Question(); q.question = data[0]; q.answer = Integer.parseInt(data[1]); q.choice1 = data[2]; q.choice2 = data[3]; q.choice3 = data[4]; list.add(q); }

    Read the article

  • How do I integrate a new MVC C# Project with an existing Web Forms VB.NET Web Application Project?

    - by Jordan Rieger
    We have a corporate website with a large amount of dynamic business application pages (e.g. Shopping Cart, Helpdesk, Product/Service management, Reporting, etc.) The site was built as an ASP.Net Web Application Project (WAP). Our systems have evolved over the years to use .NET 4.5 and various custom business logic DLLs (written in a mix of C# and VB.NET). However, the site itself is still using VB.NET Web Forms. We now have done a few side projects in MVC 4 using Razor/C#, and we want to use this framework for new pages on the main corporate site going forward. What would be the easiest way to achieve this? I found this nice list of steps to integrate MVC 4 into an existing Web Forms app. The problem is that because our existing app is a VB.NET WAP, it compiles into a single DLL, and .NET allows only one language per DLL. The site is way too big for us to contemplate converting it to C# all at once (yes, I've looked at the conversion tools, and they're good, but even 99% accuracy would leave us a huge amount of cleanup work.) I thought about converting the existing WAP into a Web Site Project (WSP) which does allow mixing languages and then following the steps above, but after a few pages of Google results, I couldn't find any steps for converting a WAP to WSP. (Plenty of sites offer the reverse steps: converting a WSP to a WAP.) Another idea I had was to create a completely separate MVC project, and then somehow squish them together into the same folder structure, where they would share the bin folder but compile to separate DLL's. I have no idea if this is possible, because certain files would collide (e.g. Global.asax, web.config, etc.) Finally, I can imagine a compromise solution where we keep all the MVC stuff in its own separate application under a subfolder of the main solution. We already use our own custom session state solution, so it wouldn't be difficult to pass data between the old site to the new pages. Which of the ideas above do you think makes the most sense for us? Is there another solution that I'm missing?

    Read the article

  • Is there a faster way to launch Activity on Android when using maven?

    - by Kamilski81
    Within Eclipse, everything works perfectly when I run 'mvn install android:deploy'...however, this takes about 18 seconds to complete. Is there a faster way to launch my android application. When I try to run my main Activity via 'Android Application' I get a huge stack trace: 09-05 14:03:09.915: E/AndroidRuntime(689): FATAL EXCEPTION: main 09-05 14:03:09.915: E/AndroidRuntime(689): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.soraapps.android.purseprideapp/com.soraapps.android.purseprideapp.PursePrideActivity}: java.lang.ClassNotFoundException: com.soraapps.android.purseprideapp.PursePrideActivity in loader dalvik.system.PathClassLoader[/data/app/com.soraapps.android.purseprideapp-2.apk] 09-05 14:03:09.915: E/AndroidRuntime(689): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569) 09-05 14:03:09.915: E/AndroidRuntime(689): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663) 09-05 14:03:09.915: E/AndroidRuntime(689): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 09-05 14:03:09.915: E/AndroidRuntime(689): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 09-05 14:03:09.915: E/AndroidRuntime(689): at android.os.Handler.dispatchMessage(Handler.java:99) 09-05 14:03:09.915: E/AndroidRuntime(689): at android.os.Looper.loop(Looper.java:123) 09-05 14:03:09.915: E/AndroidRuntime(689): at android.app.ActivityThread.main(ActivityThread.java:3683) 09-05 14:03:09.915: E/AndroidRuntime(689): at java.lang.reflect.Method.invokeNative(Native Method) 09-05 14:03:09.915: E/AndroidRuntime(689): at java.lang.reflect.Method.invoke(Method.java:507) 09-05 14:03:09.915: E/AndroidRuntime(689): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 09-05 14:03:09.915: E/AndroidRuntime(689): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 09-05 14:03:09.915: E/AndroidRuntime(689): at dalvik.system.NativeStart.main(Native Method) 09-05 14:03:09.915: E/AndroidRuntime(689): Caused by: java.lang.ClassNotFoundException: com.soraapps.android.purseprideapp.PursePrideActivity in loader dalvik.system.PathClassLoader[/data/app/com.soraapps.android.purseprideapp-2.apk] 09-05 14:03:09.915: E/AndroidRuntime(689): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240) 09-05 14:03:09.915: E/AndroidRuntime(689): at java.lang.ClassLoader.loadClass(ClassLoader.java:551) 09-05 14:03:09.915: E/AndroidRuntime(689): at java.lang.ClassLoader.loadClass(ClassLoader.java:511) 09-05 14:03:09.915: E/AndroidRuntime(689): at android.app.Instrumentation.newActivity(Instrumentation.java:1021) 09-05 14:03:09.915: E/AndroidRuntime(689): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561) 09-05 14:03:09.915: E/AndroidRuntime(689): ... 11 more Here is my pom.xml: https://gist.github.com/3656482 And here is what my files look like after I try building and running the project. (see gen and bin folders) http://cl.ly/image/3Q0x052S2Z3Q

    Read the article

  • problem with Using SAX parser

    - by moustafa
    Hi guys i have this small class task that im having trouble with. I need to create a PHP file using SAX to generate the display shown below from an XML file. Im not sure how to Use | to represent its level, where the root element orders is at level zero. This is what the result should look like when i parse it through a SAX parser http://img13.imageshack.us/img13/6950/75914446.jpg This is the XML source code from which i need to generate the display: <orders> <order> <count>37</count> <price>49.99</price> <book> <isbn>0130897930</isbn> <title>Core Web Programming Second Edition</title> <authors> <count>2</count> <author>Marty Hall</author> <author>Larry Brown</author> </authors> </book> </order> <order> <count>1</count> <price>9.95</price> <yacht> <manufacturer>Luxury Yachts, Inc.</manufacturer> <model>M-1</model> <standardFeatures oars="plastic" lifeVests="none">false</standardFeatures> </yacht> </order> <order> <count>3</count> <price>22.22</price> <book> <isbn>B000059Z4H</isbn> <title>Harry Potter and the Order of the Phoenix</title> <authors> <count>1</count> <author>J.K. Rowling</author> </authors> </book> </order>

    Read the article

  • addchild not displaying content

    - by Rajeev
    In the following code i dont have any error but why is that the addchild(video); i.e, the the video captured by webcam is not displayed <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Script> <![CDATA[ import org.com.figurew; import mx.controls.Button; import mx.controls.Alert; import flash.display.InteractiveObject; import flash.display.Sprite; import flash.media.*; import flash.net.*; public function addBody():void { var ret:Number = figurew.getInstance().getparam(); if( ret == 1) { Alert.show("Camera detected"); } if(ret == 0) { Alert.show("No camera detected"); } var cam:Camera = Camera.getCamera(); if(cam != null) { cam.setMode(640, 480, 30); var video:Video = new Video(30, 40); video.attachCamera(cam); addChild(video); } else { trace("No Camera Detected"); } } ]]> </mx:Script> <mx:Button label="Test camera" click="addBody();" x="99" y="116"/> </mx:Application > figurew.as package org.com { import flash.display.InteractiveObject; import flash.display.Sprite; import flash.media.*; import flash.net.*; public class figurew extends Sprite { public function figurew() { //getparam(); var cam:Camera = Camera.getCamera(); if(cam != null) { cam.setMode(640, 480, 30); var video:Video = new Video(300, 450); video.attachCamera(cam); addChild(video); } else { trace("No Camera Detected"); } } public function getparam():Number { var cam:Camera = Camera.getCamera(); if(cam != null) { cam.setMode(640, 480, 30); var video:Video = new Video(300, 450); video.attachCamera(cam); addChild(video); return 1; } else { return 0; trace("No Camera Detected"); } } private static var _instance:figurew = null; public static function getInstance():cldAS { if(_instance == null) { trace("No instance found"); _instance = new cldAS(); } return _instance; } } }

    Read the article

  • sequence generators are getting ignored

    - by luvfort
    I'm getting the following error while saving a object. However similar configuration is working for other model objects in my projects. Any help would be greatly appreciated. @Entity @Table(name = "ENROLLMENT_GROUP_MEMBERSHIPS", schema = "LEAD_ROUTING") public class EnrollmentGroupMembership implements Serializable, Comparable,Auditable { @javax.persistence.SequenceGenerator(name = "enrollmentGroupMemID", sequenceName = "S_ENROLLMENT_GROUP_MEMBERSHIPS") @Id @GeneratedValue(strategy = GenerationType.AUTO, generator = "enrollmentGroupMemID") @Column(name = "ID") private Long id; @ManyToOne() @JoinColumn(name = "TIER_WEIGHT_OID", referencedColumnName = "OID", updatable = false, insertable = false) private TierWeight tierWeight; public EnrollmentGroupMembership() { } } Code: @Entity @Table(name = "TIER_WEIGHT", schema = "LEAD_ROUTING") public class TierWeight implements Serializable, Auditable { @SequenceGenerator(name = "tierSequence",sequenceName = "S_TIER_WEIGHT") @Column(name = "OID") @Id @GeneratedValue(strategy = GenerationType.AUTO, generator = "tierSequence") private Long id; @OneToMany @JoinColumn(name = "TIER_WEIGHT_OID", referencedColumnName = "OID") private Set<EnrollmentGroupMembership> memberships; public TierWeight() { } } The logic layer's code is @Override public void createTier(String tierName, float weight) { TierWeight tier = new TierWeight(); tier.setWeight(weight); tier.setTier(tierName); tierWeightDAO.create(tier); } Similar Many-one configuration is working through out the project. I don't know why this one instance is failing. Any help would be greatly appreciated. The following is the error that I'm getting Caused by: org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): edu.apollogrp.d2ec.model.TierWeight at org.hibernate.id.Assigned.generate(Assigned.java:3 3) at org.hibernate.event.def.AbstractSaveEventListener. saveWithGeneratedId(AbstractSaveEventListener.java :99) The log file is telling that the sequence generator tierSequence is not getting created. However other sequence generators are getting created. 2010-06-03 11:24:51,834 DEBUG [org.hibernate.cfg.AnnotationBinder:] Processing annotations of edu.apollogrp.d2ec.model.TierWeight.dateCreated 2010-06-03 11:24:51,834 DEBUG [org.hibernate.cfg.AnnotationBinder:] Processing annotations of edu.apollogrp.d2ec.model.TierWeight.dateCreated 2010-06-03 11:24:51,834 DEBUG [org.hibernate.cfg.Ejb3Column:] Binding column DATE_CREATED unique false ....................................... ....................................... 2010-06-03 11:24:51,756 DEBUG [org.hibernate.cfg.AnnotationBinder:] Processing annotations of edu.apollogrp.d2ec.model.CounselorAvailability.id 2010-06-03 11:24:51,756 DEBUG [org.hibernate.cfg.Ejb3Column:] Binding column OID unique false 2010-06-03 11:24:51,756 DEBUG [org.hibernate.cfg.Ejb3Column:] Binding column OID unique false 2010-06-03 11:24:51,756 DEBUG [org.hibernate.cfg.AnnotationBinder:] id is an id 2010-06-03 11:24:51,756 DEBUG [org.hibernate.cfg.AnnotationBinder:] id is an id 2010-06-03 11:24:51,756 DEBUG [org.hibernate.cfg.AnnotationBinder:] Add sequence generator with name: counselorAvailabilityID 2010-06-03 11:24:51,756 DEBUG [org.hibernate.cfg.AnnotationBinder:] Add sequence generator with name: counselorAvailabilityID While debugging, I see that the org.hibernate.impl.SessionFactoryImpl is returning the "Assigned" identifierGenerator. This is horrible. I've specified the identifierGenerator as "Auto". Please see the above code. As a sidenote, I was trying to debug and seeing how the objects are getting retrieved from the database. Looks like the enrollmentgroupmembership records have the tierweight value populated. However if I look at the tierweight object, it doesn't have the enrollmentgroupmembership records. I'm puzzled. I think these two problems must be related. Maddy.

    Read the article

  • Remove links with Javascript

    - by Arlen Beiler
    How do I remove links from a webpage with Javascript. I am using Google Chrome. The code I tried is: function removehyperlinks() { try { alert(document.anchors.length); alert(document.getElementsByTagName('a')); for(i=0;i=document.anchors.length;i++) { var a = document.anchors[i]; a.outerHTML = a.innerHTML; var b = document.getElementsByTagName('a'); b[i].outerHTML = b[i].innerHTML; } } catch(e) { alert (e);} alert('done'); } Of course, this is test code, which is why I have the alerts and 2 things trying at the same time. The first alert returns "0" the second [Object NodeList] and the third returns "done". My html body looks like this: <body onload="removehyperlinks()"> <ol style="text-align:left;" class="messagelist"> <li class="accesscode"><a href="#">General information, Updates, &amp; Meetings<span class="extnumber">141133#</span></a> <ol> <li><a href="#">...</a></li> <li><a href="#">...</a></li> <li><a href="#">...</a></li> <li><a href="#">...</a></li> <li><a href="#">...</a></li> <li><a href="#">...</a></li> <li><a href="#">...</a></li> <li><a href="#">...</a></li> <li start="77"><a href="#"">...</a></li> <li start="88"><a href="#">...</a></li> <li start="99"><a href="#">...</a></li> </ol> </li> </ol> </body>

    Read the article

  • android : customer List Adatper + ArrayList

    - by Ram
    Team, Could you please help me debug the issue? ActivityAdapter activityAdapter = new ActivityAdapter(this,activityList); Log.d("list", "List Display - 1"); setListAdapter( activityAdapter ); Log.d("List", "list done"); It's throwing exception at the time of setListAdapter, 05-01 16:59:15.996: WARN/dalvikvm(251): threadid=3: thread exiting with uncaught exception (group=0x4001b188) 05-01 16:59:15.996: ERROR/AndroidRuntime(251): Uncaught handler: thread main exiting due to uncaught exception 05-01 16:59:16.204: ERROR/AndroidRuntime(251): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.antennasoftware.xml/com.antennasoftware.xml.XMLParsing}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list' 05-01 16:59:16.204: ERROR/AndroidRuntime(251): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2454) 05-01 16:59:16.204: ERROR/AndroidRuntime(251): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2470) 05-01 16:59:16.204: ERROR/AndroidRuntime(251): at android.app.ActivityThread.access$2200(ActivityThread.java:119) 05-01 16:59:16.204: ERROR/AndroidRuntime(251): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821) 05-01 16:59:16.204: ERROR/AndroidRuntime(251): at android.os.Handler.dispatchMessage(Handler.java:99) 05-01 16:59:16.204: ERROR/AndroidRuntime(251): at android.os.Looper.loop(Looper.java:123) 05-01 16:59:16.204: ERROR/AndroidRuntime(251): at android.app.ActivityThread.main(ActivityThread.java:4310) 05-01 16:59:16.204: ERROR/AndroidRuntime(251): at java.lang.reflect.Method.invokeNative(Native Method) 05-01 16:59:16.204: ERROR/AndroidRuntime(251): at java.lang.reflect.Method.invoke(Method.java:521) 05-01 16:59:16.204: ERROR/AndroidRuntime(251): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 05-01 16:59:16.204: ERROR/AndroidRuntime(251): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 05-01 16:59:16.204: ERROR/AndroidRuntime(251): at dalvik.system.NativeStart.main(Native Method) 05-01 16:59:16.204: ERROR/AndroidRuntime(251): Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list' 05-01 16:59:16.204: ERROR/AndroidRuntime(251): at android.app.ListActivity.onContentChanged(ListActivity.java:236) 05-01 16:59:16.204: ERROR/AndroidRuntime(251): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:201) 05-01 16:59:16.204: ERROR/AndroidRuntime(251): at android.app.Activity.setContentView(Activity.java:1622) 05-01 16:59:16.204: ERROR/AndroidRuntime(251): at com.antennasoftware.xml.XMLParsing.onCreate(XMLParsing.java:36) 05-01 16:59:16.204: ERROR/AndroidRuntime(251): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 05-01 16:59:16.204: ERROR/AndroidRuntime(251): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2417) 05-01 16:59:16.204: ERROR/AndroidRuntime(251): ... 11 more Thanks in advance

    Read the article

  • How do compare dates when one of those are in string format in android

    - by Raj
    I am very much new to android so need some good help with a code example. I am getting a date in form of string from a server in the following format 2012-08-17 00:00:00 I want to compare this string with current date to find the difference between the dates in the form of year, months and days... I tried playing around it in the following code Date currentDate = new Date(System.currentTimeMillis()); Log.v("@@@@@@@@@","Current Date: " + currentDate); Date passDate = new SimpleDateFormat().parse(passDateString); Log.v("@@@@@@@@@","Pass Date: " + passDate); dateDifference = passDate.compareTo(currentDate); but it returned with following exception 04-15 12:08:29.101: V/@@@@@@@@@(1161): Current Date: Sun Apr 15 12:08:29 GMT+01:00 2012 04-15 12:08:29.101: W/System.err(1161): java.text.ParseException: Unparseable date: 2012-08-17 00:00:00 04-15 12:08:29.111: W/System.err(1161): at java.text.DateFormat.parse(DateFormat.java:645) 04-15 12:08:29.111: W/System.err(1161): at org.apis.PassesListItemAdapter.getView(PassesListItemAdapter.java:77) 04-15 12:08:29.111: W/System.err(1161): at android.widget.AbsListView.obtainView(AbsListView.java:1315) 04-15 12:08:29.111: W/System.err(1161): at android.widget.ListView.makeAndAddView(ListView.java:1727) 04-15 12:08:29.111: W/System.err(1161): at android.widget.ListView.fillDown(ListView.java:652) 04-15 12:08:29.111: W/System.err(1161): at android.widget.ListView.fillFromTop(ListView.java:709) 04-15 12:08:29.111: W/System.err(1161): at android.widget.ListView.layoutChildren(ListView.java:1580) 04-15 12:08:29.111: W/System.err(1161): at android.widget.AbsListView.onLayout(AbsListView.java:1147) 04-15 12:08:29.111: W/System.err(1161): at android.view.View.layout(View.java:7034) 04-15 12:08:29.111: W/System.err(1161): at android.widget.RelativeLayout.onLayout(RelativeLayout.java:909) 04-15 12:08:29.111: W/System.err(1161): at android.view.View.layout(View.java:7034) 04-15 12:08:29.111: W/System.err(1161): at android.widget.FrameLayout.onLayout(FrameLayout.java:333) 04-15 12:08:29.111: W/System.err(1161): at android.view.View.layout(View.java:7034) 04-15 12:08:29.111: W/System.err(1161): at android.widget.FrameLayout.onLayout(FrameLayout.java:333) 04-15 12:08:29.111: W/System.err(1161): at android.view.View.layout(View.java:7034) 04-15 12:08:29.111: W/System.err(1161): at android.view.ViewRoot.performTraversals(ViewRoot.java:1049) 04-15 12:08:29.111: W/System.err(1161): at android.view.ViewRoot.handleMessage(ViewRoot.java:1744) 04-15 12:08:29.111: W/System.err(1161): at android.os.Handler.dispatchMessage(Handler.java:99) 04-15 12:08:29.111: W/System.err(1161): at android.os.Looper.loop(Looper.java:144) 04-15 12:08:29.111: W/System.err(1161): at android.app.ActivityThread.main(ActivityThread.java:4937) 04-15 12:08:29.111: W/System.err(1161): at java.lang.reflect.Method.invokeNative(Native Method) 04-15 12:08:29.111: W/System.err(1161): at java.lang.reflect.Method.invoke(Method.java:521) 04-15 12:08:29.111: W/System.err(1161): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 04-15 12:08:29.111: W/System.err(1161): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 04-15 12:08:29.111: W/System.err(1161): at dalvik.system.NativeStart.main(Native Method) I am stuck... please help Raj

    Read the article

  • uninitialized constant Encoding rake db:migrate

    - by Denis
    Hi, My RoR App use rails 2.1.2 When I run rake db:migrate --trace I get the following error, Any idea? ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate rake aborted! uninitialized constant Encoding /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activesupport/lib/active_support/dependencies.rb:278:in `load_missing_constant' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activesupport/lib/active_support/dependencies.rb:467:in `const_missing' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activesupport/lib/active_support/dependencies.rb:479:in `const_missing' /Library/Ruby/Gems/1.8/gems/sqlite3-0.0.8/lib/sqlite3/encoding.rb:9:in `find' /Library/Ruby/Gems/1.8/gems/sqlite3-0.0.8/lib/sqlite3/database.rb:66:in `initialize' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb:13:in `new' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb:13:in `sqlite3_connection' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:292:in `send' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:292:in `connection=' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:260:in `retrieve_connection' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activerecord/lib/active_record/migration.rb:408:in `initialize' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activerecord/lib/active_record/migration.rb:373:in `new' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activerecord/lib/active_record/migration.rb:373:in `up' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/activerecord/lib/active_record/migration.rb:356:in `migrate' /Users/denisjacquemin/Documents/code/projects/BmfOnRails/vendor/rails/railties/lib/tasks/databases.rake:99 /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' /Users/denisjacquemin/.gem/ruby/1.8/gems/rake-0.8.7/bin/rake:31 /usr/bin/rake:19:in `load' /usr/bin/rake:19 My database.yml development: adapter: sqlite3 database: db/development.sqlite3 pool: 5 timeout: 5000 thanks

    Read the article

  • Activity gets killed while executing the camera intent

    - by BlackRider
    In my app I call the system camera to take a picture, and then handle the result in onActivityResult. You know, the usual. It used to work, but now my calling activity gets killed while I'm taking the picture. Specifically, onDestroy() is called on my activity right after I press the camera shutter. The photo does get taken & saved (I've checked that the file gets written on the SD card). After I accept the photo, instead of returning to the calling activity and invoking onActivityResult, the previous activity in the activity stack gets called. I see no exceptions in the logcat. My custom exception handler doesn't get called. If it matters, my app also includes a service that listens to GPS updates, but I unregister all the receivers in onPause(). Here's the call stack for MyCallingActivity.onDestroy(): Thread [<1> main] (Suspended (breakpoint at line 303 in NewPlaceDetailsActivity)) NewPlaceDetailsActivity.onDestroy() line: 303 ActivityThread.performDestroyActivity(IBinder, boolean, int, boolean) line: 2663 ActivityThread.handleDestroyActivity(IBinder, boolean, int, boolean) line: 2694 ActivityThread.access$2100(ActivityThread, IBinder, boolean, int, boolean) line: 117 BinderProxy(ActivityThread$H).handleMessage(Message) line: 968 ActivityThread$H(Handler).dispatchMessage(Message) line: 99 Looper.loop() line: 130 ActivityThread.main(String[]) line: 3687 Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method] Method.invoke(Object, Object...) line: 507 ZygoteInit$MethodAndArgsCaller.run() line: 842 ZygoteInit.main(String[]) line: 600 NativeStart.main(String[]) line: not available [native method] This is how I start the camera activity, in case you're wondering: protected void startCamera() { createPhotoDirsIfNeeded(); String fileName = "temp.jpg"; ContentValues values = new ContentValues(); values.put(MediaStore.Images.Media.TITLE, fileName); m_capturedImageUri = getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); m_photoFileName = APP_PHOTO_PATH + "/" + DateFormat.format(DATE_FORMAT, Calendar.getInstance().getTime()) + ".jpg"; File picFile = new File(m_photoFileName); if(picFile.exists()) { picFile.delete(); } // start the camera activity Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(picFile)); startActivityForResult(intent, IntentHelper.REQUEST_TAKE_PHOTO); } How can I find out why does my activity get killed, AND removed from the stack instead of being created again?

    Read the article

  • Trouble using South with Django and Heroku

    - by Dan
    I had an existing Django project that I've just added South to. I ran syncdb locally. I ran manage.py schemamigration app_name locally I ran manage.py migrate app_name --fake locally I commit and pushed to heroku master I ran syncdb on heroku I ran manage.py schemamigration app_name on heroku I ran manage.py migrate app_name on heroku I then receive this: $ heroku run python notecard/manage.py migrate notecards Running python notecard/manage.py migrate notecards attached to terminal... up, run.1 Running migrations for notecards: - Migrating forwards to 0005_initial. > notecards:0003_initial Traceback (most recent call last): File "notecard/manage.py", line 14, in <module> execute_manager(settings) File "/app/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager utility.execute() File "/app/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/app/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv self.execute(*args, **options.__dict__) File "/app/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute output = self.handle(*args, **options) File "/app/lib/python2.7/site-packages/south/management/commands/migrate.py", line 105, in handle ignore_ghosts = ignore_ghosts, File "/app/lib/python2.7/site-packages/south/migration/__init__.py", line 191, in migrate_app success = migrator.migrate_many(target, workplan, database) File "/app/lib/python2.7/site-packages/south/migration/migrators.py", line 221, in migrate_many result = migrator.__class__.migrate_many(migrator, target, migrations, database) File "/app/lib/python2.7/site-packages/south/migration/migrators.py", line 292, in migrate_many result = self.migrate(migration, database) File "/app/lib/python2.7/site-packages/south/migration/migrators.py", line 125, in migrate result = self.run(migration) File "/app/lib/python2.7/site-packages/south/migration/migrators.py", line 99, in run return self.run_migration(migration) File "/app/lib/python2.7/site-packages/south/migration/migrators.py", line 81, in run_migration migration_function() File "/app/lib/python2.7/site-packages/south/migration/migrators.py", line 57, in <lambda> return (lambda: direction(orm)) File "/app/notecard/notecards/migrations/0003_initial.py", line 15, in forwards ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), File "/app/lib/python2.7/site-packages/south/db/generic.py", line 226, in create_table ', '.join([col for col in columns if col]), File "/app/lib/python2.7/site-packages/south/db/generic.py", line 150, in execute cursor.execute(sql, params) File "/app/lib/python2.7/site-packages/django/db/backends/util.py", line 34, in execute return self.cursor.execute(sql, params) File "/app/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute return self.cursor.execute(query, args) django.db.utils.DatabaseError: relation "notecards_semester" already exists I have 3 models. Section, Semester, and Notecards. I've added one field to the Notecards model and I cannot get it added on Heroku. Thank you.

    Read the article

  • android app crashes if keyboard was shown

    - by Jaume
    I have an activity that I force keyboard to appears using, InputMethodManager inputMethodManager=(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); inputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); keyboard appears properly and also obscured when needed. Problem is when I finish the activity, app crashes. If the activity never shows keyboard or shows it without start editing text, it is finished with no errors but if you just write one single character or more, app will crash. How to solve it? thank you. method used to finish activity, boto_back.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { InputMethodManager inputMethodManager=(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); inputMethodManager.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0); finish(); } }); @Override public void onDestroy() { if (adMob != null) { // Destroy the AdView. adMob.destroy(); } super.onDestroy(); } logcat, 07-07 19:04:25.191: E/AndroidRuntime(8443): FATAL EXCEPTION: main 07-07 19:04:25.191: E/AndroidRuntime(8443): java.lang.RuntimeException: Unable to destroy activity {com.xxxx.xxxx/com.xxxx.projecte1.TabBar_iOSActivity}: java.lang.RuntimeException: Unable to destroy activity {com.xxxx.xxxx/com.xxxx.projecte1.webPush}: java.lang.NullPointerException 07-07 19:04:25.191: E/AndroidRuntime(8443): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:2693) 07-07 19:04:25.191: E/AndroidRuntime(8443): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:2711) 07-07 19:04:25.191: E/AndroidRuntime(8443): at android.app.ActivityThread.access$2100(ActivityThread.java:121) 07-07 19:04:25.191: E/AndroidRuntime(8443): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:976) 07-07 19:04:25.191: E/AndroidRuntime(8443): at android.os.Handler.dispatchMessage(Handler.java:99) 07-07 19:04:25.191: E/AndroidRuntime(8443): at android.os.Looper.loop(Looper.java:130) 07-07 19:04:25.191: E/AndroidRuntime(8443): at android.app.ActivityThread.main(ActivityThread.java:3701) 07-07 19:04:25.191: E/AndroidRuntime(8443): at java.lang.reflect.Method.invokeNative(Native Method) 07-07 19:04:25.191: E/AndroidRuntime(8443): at java.lang.reflect.Method.invoke(Method.java:507) 07-07 19:04:25.191: E/AndroidRuntime(8443): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) 07-07 19:04:25.191: E/AndroidRuntime(8443): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:624) 07-07 19:04:25.191: E/AndroidRuntime(8443): at dalvik.system.NativeStart.main(Native Method) 07-07 19:04:25.191: E/AndroidRuntime(8443): Caused by: java.lang.RuntimeException: Unable to destroy activity {com.xxxx.xxxx/com.xxxx.projecte1.webPush}: java.lang.NullPointerException 07-07 19:04:25.191: E/AndroidRuntime(8443): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:2693) 07-07 19:04:25.191: E/AndroidRuntime(8443): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:2603) 07-07 19:04:25.191: E/AndroidRuntime(8443): at android.app.LocalActivityManager.dispatchDestroy(LocalActivityManager.java:622) 07-07 19:04:25.191: E/AndroidRuntime(8443): at android.app.ActivityGroup.onDestroy(ActivityGroup.java:85) 07-07 19:04:25.191: E/AndroidRuntime(8443): at com.xxxx.projecte1.TabBar_iOSActivity.onDestroy(TabBar_iOSActivity.java:417) 07-07 19:04:25.191: E/AndroidRuntime(8443): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:2680) 07-07 19:04:25.191: E/AndroidRuntime(8443): ... 11 more

    Read the article

  • Endianness conversion and g++ warnings

    - by SuperBloup
    I've got the following C++ code : template <int isBigEndian, typename val> struct EndiannessConv { inline static val fromLittleEndianToHost( val v ) { union { val outVal __attribute__ ((used)); uint8_t bytes[ sizeof( val ) ] __attribute__ ((used)); } ; outVal = v; std::reverse( &bytes[0], &bytes[ sizeof(val) ] ); return outVal; } inline static void convertArray( val v[], uint32_t size ) { // TODO : find a way to map the array for (uint32_t i = 0; i < size; i++) for (uint32_t i = 0; i < size; i++) v[i] = fromLittleEndianToHost( v[i] ); } }; Which work and has been tested (without the used attributes). When compiling I obtain the following errors from g++ (version 4.4.1) || g++ -Wall -Wextra -O3 -o t t.cc || t.cc: In static member function 'static val EndiannessConv<isBigEndian, val>::fromLittleEndianToHost(val)': t.cc|98| warning: 'used' attribute ignored t.cc|99| warning: 'used' attribute ignored || t.cc: In static member function 'static val EndiannessConv<isBigEndian, val>::fromLittleEndianToHost(val) [with int isBigEndian = 1, val = double]': t.cc|148| instantiated from here t.cc|100| warning: unused variable 'outVal' t.cc|100| warning: unused variable 'bytes' I've tried to use the following code : template <int size, typename valType> struct EndianInverser { /* should not compile */ }; template <typename valType> struct EndianInverser<4, valType> { static inline valType reverseEndianness( const valType &val ) { uint32_t castedVal = *reinterpret_cast<const uint32_t*>( &val ); castedVal = (castedVal & 0x000000FF << (3 * 8)) | (castedVal & 0x0000FF00 << (1 * 8)) | (castedVal & 0x00FF0000 >> (1 * 8)) | (castedVal & 0xFF000000 >> (3 * 8)); return *reinterpret_cast<valType*>( &castedVal ); } }; but it break when enabling optimizations due to the type punning. So, why does my used attribute got ignored? Is there a workaround to convert endianness (I rely on the enum to avoid type punning) in templates?

    Read the article

  • JavaScript regular expression literal persists between function calls

    - by Charles Anderson
    I have this piece of code: function func1(text) { var pattern = /([\s\S]*?)(\<\?(?:attrib |if |else-if |else|end-if|search |for |end-for)[\s\S]*?\?\>)/g; var result; while (result = pattern.exec(text)) { if (some condition) { throw new Error('failed'); } ... } } This works, unless the throw statement is executed. In that case, the next time I call the function, the exec() call starts where it left off, even though I am supplying it with a new value of 'text'. I can fix it by writing var pattern = new RegExp('.....'); instead, but I don't understand why the first version is failing. How is the regular expression persisting between function calls? (This is happening in the latest versions of Firefox and Chrome.) Edit Complete test case: <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-type" content="text/html;charset=UTF-8"> <title>Test Page</title> <style type='text/css'> body { font-family: sans-serif; } #log p { margin: 0; padding: 0; } </style> <script type='text/javascript'> function func1(text, count) { var pattern = /(one|two|three|four|five|six|seven|eight)/g; log("func1"); var result; while (result = pattern.exec(text)) { log("result[0] = " + result[0] + ", pattern.index = " + pattern.index); if (--count <= 0) { throw "Error"; } } } function go() { try { func1("one two three four five six seven eight", 3); } catch (e) { } try { func1("one two three four five six seven eight", 2); } catch (e) { } try { func1("one two three four five six seven eight", 99); } catch (e) { } try { func1("one two three four five six seven eight", 2); } catch (e) { } } function log(msg) { var log = document.getElementById('log'); var p = document.createElement('p'); p.innerHTML = msg; log.appendChild(p); } </script> </head> <body><div> <input type='button' id='btnGo' value='Go' onclick='go();'> <hr> <div id='log'></div> </div></body> </html> The regular expression continues with 'four' as of the second call on FF and Chrome, not on IE7 or Opera.

    Read the article

  • Android - exception from an AsynchTask call

    - by GeekedOut
    I have an Activity that makes a remote server call and tries to populate a list. The call to the server works fine, and the call returns some JSON which is good. But then the system throws this exception: 04-06 18:43:19.626: D/AndroidRuntime(2564): Shutting down VM 04-06 18:43:19.626: W/dalvikvm(2564): threadid=1: thread exiting with uncaught exception (group=0x409c01f8) 04-06 18:43:19.686: E/AndroidRuntime(2564): FATAL EXCEPTION: main 04-06 18:43:19.686: E/AndroidRuntime(2564): java.lang.NullPointerException 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:394) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.ArrayAdapter.getView(ArrayAdapter.java:362) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.AbsListView.obtainView(AbsListView.java:2033) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.ListView.measureHeightOfChildren(ListView.java:1244) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.ListView.onMeasure(ListView.java:1155) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.view.View.measure(View.java:12723) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1369) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.LinearLayout.measureVertical(LinearLayout.java:660) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.LinearLayout.onMeasure(LinearLayout.java:553) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.view.View.measure(View.java:12723) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.FrameLayout.onMeasure(FrameLayout.java:293) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.view.View.measure(View.java:12723) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.LinearLayout.measureVertical(LinearLayout.java:812) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.LinearLayout.onMeasure(LinearLayout.java:553) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.view.View.measure(View.java:12723) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4698) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.widget.FrameLayout.onMeasure(FrameLayout.java:293) 04-06 18:43:19.686: E/AndroidRuntime(2564): at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2092) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.view.View.measure(View.java:12723) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1064) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2442) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.os.Handler.dispatchMessage(Handler.java:99) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.os.Looper.loop(Looper.java:137) 04-06 18:43:19.686: E/AndroidRuntime(2564): at android.app.ActivityThread.main(ActivityThread.java:4424) 04-06 18:43:19.686: E/AndroidRuntime(2564): at java.lang.reflect.Method.invokeNative(Native Method) 04-06 18:43:19.686: E/AndroidRuntime(2564): at java.lang.reflect.Method.invoke(Method.java:511) 04-06 18:43:19.686: E/AndroidRuntime(2564): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 04-06 18:43:19.686: E/AndroidRuntime(2564): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 04-06 18:43:19.686: E/AndroidRuntime(2564): at dalvik.system.NativeStart.main(Native Method) Why would this happen? It doesn't point to any of my code so its a bit strange. the protected void onPostExecute(String result) never gets called on the callback. Thanks!

    Read the article

  • Recommended ASP.NET Shared Hosting

    - by coffeeaddict
    Ok, I have to admit I'm getting fed up with www.discountasp.net's pricing model and this annoyance has built up over the past 8 years or so. I've been with them for years and absolutely love them on the technical side, however it's getting ridiculously expensive for so little that you get. I mean here's my scenario: 1) I am running 2 SQL Server databases which costs me $10/ea per month so that's $20/month for 2 and I only get 500 mb disk space which is horrible 2) I am paying $10/mo just for the hosting itself which I only get 1 gig of disk space! I mean common! 3) I am simply running 2 small apps (Screwturn Wiki & Subtext Blog)...so I don't really care if it's up 99% or not, it's not worth paying a total of $300 just to keep these 2 apps running over discountasp.net Anyone else feel the same? Yes, I know they have great support, probably have great servers running behind this but in the end I really don't care as long as my site is up 95% or better. Yes, the hosting toolset rocks. But you know I bet you I can find a similar set somewhere else. I like how I can totally control IIS 7 at discountasp and I can control my own app pool etc. That's very powerful and essential. But anyone have any good alternatives to discountasp that gives me close to the same at a much more reasonable cost point? I mean http://www.m6.net/prices.aspx gives you 10 SQL Databases for $7 and 200 gigs disk space! I don't know about their tools or support but just looking at those numbers and some other hosts I've seen, I feel that discountasp.net is way out of line. They don't even offer any purchasing discounts such as it would be nice if my 2nd SQL Server is only $5/month not $10...stuff like this, to make it much more realistic and fair. Opinions (people who do have discountasp.net, people who have left them, or people who have another host they like)??? But geez $300 just to host a couple DBs and lightweight open source apps? Not worth the price they are charging. I'm almost at a price point that enables me to get a decent dedicated server! I really don't care about beta support. Not a big deal to me.

    Read the article

  • One intent is working, second is giving me a crash

    - by user1480742
    ok, so both intents receiver sides are on the same activite and they are sending from different ones....second one is not working, first one does, dont know why...all 3 activites are ok in manifest and all that //second intent on senders side public void onItemSelected(AdapterView<?> arg0, View users, int i, long l) { FILENAME = (adapter.getItem(i)).toString(); Bundle viewBag2 = new Bundle(); viewBag2.putString("profile_name", FILENAME); Intent b = new Intent(OptionsMenu.this, CoreActivity.class); b.putExtras(viewBag2); startActivity(b); } //second intent on receiver side private void Data_transfer() { Bundle gotbasket2 = getIntent().getExtras(); profileName = gotbasket2.getString("profile_name"); } //first (working intent) on senders side public void onClick(View v) { Bundle viewBag = new Bundle(); viewBag.putString("spinner_result", s); a.putExtras(viewBag); } //first (working intent) on receiver side private void Data_transfer() { // TODO Auto-generated method stub Bundle gotbasket = getIntent().getExtras(); x = gotbasket.getString("spinner_result"); } 06-26 20:22:09.787: D/AndroidRuntime(1802): Shutting down VM 06-26 20:22:09.787: W/dalvikvm(1802): threadid=1: thread exiting with uncaught exception (group=0x40015560) 06-26 20:22:09.847: E/AndroidRuntime(1802): FATAL EXCEPTION: main 06-26 20:22:09.847: E/AndroidRuntime(1802): java.lang.RuntimeException: Unable to start activity ComponentInfo{mioc.diver/mioc.diver.CoreActivity}: java.lang.NullPointerException 06-26 20:22:09.847: E/AndroidRuntime(1802): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647) 06-26 20:22:09.847: E/AndroidRuntime(1802): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663) 06-26 20:22:09.847: E/AndroidRuntime(1802): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 06-26 20:22:09.847: E/AndroidRuntime(1802): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 06-26 20:22:09.847: E/AndroidRuntime(1802): at android.os.Handler.dispatchMessage(Handler.java:99) 06-26 20:22:09.847: E/AndroidRuntime(1802): at android.os.Looper.loop(Looper.java:123) 06-26 20:22:09.847: E/AndroidRuntime(1802): at android.app.ActivityThread.main(ActivityThread.java:3683) 06-26 20:22:09.847: E/AndroidRuntime(1802): at java.lang.reflect.Method.invokeNative(Native Method) 06-26 20:22:09.847: E/AndroidRuntime(1802): at java.lang.reflect.Method.invoke(Method.java:507) 06-26 20:22:09.847: E/AndroidRuntime(1802): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 06-26 20:22:09.847: E/AndroidRuntime(1802): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 06-26 20:22:09.847: E/AndroidRuntime(1802): at dalvik.system.NativeStart.main(Native Method) 06-26 20:22:09.847: E/AndroidRuntime(1802): Caused by: java.lang.NullPointerException 06-26 20:22:09.847: E/AndroidRuntime(1802): at mioc.diver.CoreActivity.Data_transfer(CoreActivity.java:189) 06-26 20:22:09.847: E/AndroidRuntime(1802): at mioc.diver.CoreActivity.onCreate(CoreActivity.java:88) 06-26 20:22:09.847: E/AndroidRuntime(1802): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 06-26 20:22:09.847: E/AndroidRuntime(1802): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611) 06-26 20:22:09.847: E/AndroidRuntime(1802): ... 11 more

    Read the article

< Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >