Search Results

Search found 1090 results on 44 pages for 'elguapo 85'.

Page 14/44 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • In Wireshark's Protocol Hierarchy Statistics screen, is the total byte count of a capture the sum of the Bytes column or just the top line (Frame)?

    - by Howiecamp
    Part 1 - I'm looking at Wireshark's Protocol Hierarchy Statistics screen (sample below), is the total byte count of the capture the sum of the Bytes column or just the top line (Frame)? I'm 99% that it's the latter because of protocol rollup but I wanted to conform. Part 2 - From Wireshark documentation on this screen, "Protocol layers can consist of packets that won't contain any higher layer protocol, so the sum of all higher layer packets may not sum up to the protocols packet count. Example: In the screenshot TCP has 85,83% but the sum of the subprotocols (HTTP, ...) is much less. This may be caused by TCP protocol overhead, e.g. TCP ACK packets won't be counted as packets of the higher layer)." Can you explain this?

    Read the article

  • Internet connection resets (wifi), no device has wifi for moment

    - by Gizmo
    I have a few devices setup and I noticed this happens with both my old and new router (two different vendors&models) This happens occasionally, and I tried wireshark today and this cought my attention: No. Time Source Destination Protocol Length Info 69 6.464423000 LiteonTe_7f:64:30 Broadcast ARP 42 Who has 192.168.2.4? Tell 0.0.0.0 73 7.451146000 LiteonTe_59:65:94 Arcadyan_e1:8c:cf ARP 42 Who has 192.168.2.254? Tell 192.168.2.1 85 9.450443000 LiteonTe_59:65:94 Arcadyan_e1:8c:cf ARP 42 Who has 192.168.2.254? Tell 192.168.2.1 91 10.521000000 LiteonTe_59:65:94 Broadcast ARP 42 Who has 192.168.2.254? Tell 192.168.2.1 93 10.860953000 LiteonTe_7f:64:30 Broadcast ARP 42 Who has 192.168.2.254? Tell 192.168.2.4 97 11.099463000 LiteonTe_7f:64:30 Broadcast ARP 42 Who has 192.168.2.254? Tell 192.168.2.4 where 192.168.2.254 is the gateway/router, 192.168.2.1 my laptop ip and 192.168.2.4 my sisters laptop.. what's happening here?

    Read the article

  • setreg.exe for Windows 7

    - by victoriah
    I want to use setreg.exe (http://msdn.microsoft.com/en-us/library/aa387700(VS.85).aspx) to disable the certificate revocation check. However, it's based on an older version of .NET than what I have. Microsoft says it's shipped with the older .net SDK, and when I download that, try to install, it says something like 'can't install SDK without .net 1.1'. In the article linked it says for newer versions I should use SignTool, but SignTool does not appear to have the function I need . Is it possible to either - a) find a tool that can perform the function I need that doesn't need me to install the older .NET b) get setreg.exe without downloading the SDK or do I need to install the older .NET on my machine? And if the latter is the case, what do I need to do to install an older .NET? Will it overwrite my current .NET? Thanks,

    Read the article

  • NullPointerException in com.sun.tools.jxc.SchemaGenTask

    - by David Collie
    Given this ant script: <?xml version="1.0" encoding="UTF-8"?> <project name="projectname" default="generate-schema" basedir="."> <taskdef name="schemagen" classname="com.sun.tools.jxc.SchemaGenTask"> <classpath> <fileset dir="../BuildJars/lib" includes="*.jar" /> </classpath> </taskdef> <target name="generate-schema"> <schemagen srcdir="src/gb/informaticasystems/messages" destdir="schema"> <schema namespace="http://www.informatica-systems.co.uk/aquarius/messages/1.0" file="messages-1.0.xsd" /> </schemagen> </target> </project> I am getting this error: Buildfile: C:\Users\davidcollie\workspace\aquarius-feature\AquariusServerLibrary\schemagen.xml generate-schema: [schemagen] Generating schema from 4 source files [schemagen] Problem encountered during annotation processing; [schemagen] see stacktrace below for more information. [schemagen] java.lang.NullPointerException [schemagen] at com.sun.tools.jxc.model.nav.APTNavigator$2.onDeclaredType(APTNavigator.java:428) [schemagen] at com.sun.tools.jxc.model.nav.APTNavigator$2.onClassType(APTNavigator.java:402) [schemagen] at com.sun.tools.jxc.model.nav.APTNavigator$2.onClassType(APTNavigator.java:456) [schemagen] at com.sun.istack.tools.APTTypeVisitor.apply(APTTypeVisitor.java:27) [schemagen] at com.sun.tools.jxc.model.nav.APTNavigator.getBaseClass(APTNavigator.java:109) [schemagen] at com.sun.tools.jxc.model.nav.APTNavigator.getBaseClass(APTNavigator.java:85) [schemagen] at com.sun.xml.bind.v2.model.impl.PropertyInfoImpl.getIndividualType(PropertyInfoImpl.java:190) [schemagen] at com.sun.xml.bind.v2.model.impl.PropertyInfoImpl.<init>(PropertyInfoImpl.java:132) [schemagen] at com.sun.xml.bind.v2.model.impl.MapPropertyInfoImpl.<init>(MapPropertyInfoImpl.java:67) [schemagen] at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.createMapProperty(ClassInfoImpl.java:917) [schemagen] at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.addProperty(ClassInfoImpl.java:874) [schemagen] at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.findGetterSetterProperties(ClassInfoImpl.java:993) [schemagen] at com.sun.xml.bind.v2.model.impl.ClassInfoImpl.getProperties(ClassInfoImpl.java:303) [schemagen] at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:243) [schemagen] at com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:209) [schemagen] at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:315) [schemagen] at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:330) [schemagen] at com.sun.tools.xjc.api.impl.j2s.JavaCompilerImpl.bind(JavaCompilerImpl.java:90) [schemagen] at com.sun.tools.jxc.apt.SchemaGenerator$1.process(SchemaGenerator.java:115) [schemagen] at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60) [schemagen] at com.sun.tools.apt.comp.Apt.main(Apt.java:454) [schemagen] at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:258) [schemagen] at com.sun.tools.apt.main.Main.compile(Main.java:1102) [schemagen] at com.sun.tools.apt.main.Main.compile(Main.java:964) [schemagen] at com.sun.tools.apt.Main.processing(Main.java:95) [schemagen] at com.sun.tools.apt.Main.process(Main.java:85) [schemagen] at com.sun.tools.apt.Main.process(Main.java:67) [schemagen] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [schemagen] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [schemagen] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [schemagen] at java.lang.reflect.Method.invoke(Method.java:597) [schemagen] at com.sun.tools.jxc.AptBasedTask$InternalAptAdapter.execute(AptBasedTask.java:97) [schemagen] at com.sun.tools.jxc.AptBasedTask.compile(AptBasedTask.java:144) [schemagen] at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:820) [schemagen] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) [schemagen] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [schemagen] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [schemagen] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [schemagen] at java.lang.reflect.Method.invoke(Method.java:597) [schemagen] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) [schemagen] at org.apache.tools.ant.Task.perform(Task.java:348) [schemagen] at org.apache.tools.ant.Target.execute(Target.java:357) [schemagen] at org.apache.tools.ant.Target.performTasks(Target.java:385) [schemagen] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) [schemagen] at org.apache.tools.ant.Project.executeTarget(Project.java:1298) [schemagen] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [schemagen] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32) [schemagen] at org.apache.tools.ant.Project.executeTargets(Project.java:1181) [schemagen] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423) [schemagen] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137) BUILD FAILED C:\Users\davidcollie\workspace\aquarius-feature\AquariusServerLibrary\schemagen.xml:11: schema generation failed Total time: 1 second Any ideas?

    Read the article

  • Android: OutOfMemoryError while uploading video...

    - by AP257
    Hi all, I have the same problem as described here, but I will supply a few more details. While trying to upload a video in Android, I'm reading it into memory, and if the video is large I get an OutOfMemoryError. Here's my code: // get bytestream to upload videoByteArray = getBytesFromFile(cR, fileUriString); public static byte[] getBytesFromFile(ContentResolver cR, String fileUriString) throws IOException { Uri tempuri = Uri.parse(fileUriString); InputStream is = cR.openInputStream(tempuri); byte[] b3 = readBytes(is); is.close(); return b3; } public static byte[] readBytes(InputStream inputStream) throws IOException { ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream(); // this is storage overwritten on each iteration with bytes int bufferSize = 1024; byte[] buffer = new byte[bufferSize]; int len = 0; while ((len = inputStream.read(buffer)) != -1) { byteBuffer.write(buffer, 0, len); } return byteBuffer.toByteArray(); } And here's the traceback (the error is thrown on the byteBuffer.write(buffer, 0, len) line): 04-08 11:56:20.456: ERROR/dalvikvm-heap(6088): Out of memory on a 16775184-byte allocation. 04-08 11:56:20.456: INFO/dalvikvm(6088): "IntentService[UploadService]" prio=5 tid=17 RUNNABLE 04-08 11:56:20.456: INFO/dalvikvm(6088): | group="main" sCount=0 dsCount=0 s=N obj=0x449a3cf0 self=0x38d410 04-08 11:56:20.456: INFO/dalvikvm(6088): | sysTid=6119 nice=0 sched=0/0 cgrp=default handle=4010416 04-08 11:56:20.456: INFO/dalvikvm(6088): at java.io.ByteArrayOutputStream.expand(ByteArrayOutputStream.java:~93) 04-08 11:56:20.456: INFO/dalvikvm(6088): at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:218) 04-08 11:56:20.456: INFO/dalvikvm(6088): at com.android.election2010.UploadService.readBytes(UploadService.java:199) 04-08 11:56:20.456: INFO/dalvikvm(6088): at com.android.election2010.UploadService.getBytesFromFile(UploadService.java:182) 04-08 11:56:20.456: INFO/dalvikvm(6088): at com.android.election2010.UploadService.doUploadinBackground(UploadService.java:118) 04-08 11:56:20.456: INFO/dalvikvm(6088): at com.android.election2010.UploadService.onHandleIntent(UploadService.java:85) 04-08 11:56:20.456: INFO/dalvikvm(6088): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:30) 04-08 11:56:20.456: INFO/dalvikvm(6088): at android.os.Handler.dispatchMessage(Handler.java:99) 04-08 11:56:20.456: INFO/dalvikvm(6088): at android.os.Looper.loop(Looper.java:123) 04-08 11:56:20.456: INFO/dalvikvm(6088): at android.os.HandlerThread.run(HandlerThread.java:60) 04-08 11:56:20.467: WARN/dalvikvm(6088): threadid=17: thread exiting with uncaught exception (group=0x4001b180) 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): Uncaught handler: thread IntentService[UploadService] exiting due to uncaught exception 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): java.lang.OutOfMemoryError 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): at java.io.ByteArrayOutputStream.expand(ByteArrayOutputStream.java:93) 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:218) 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): at com.android.election2010.UploadService.readBytes(UploadService.java:199) 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): at com.android.election2010.UploadService.getBytesFromFile(UploadService.java:182) 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): at com.android.election2010.UploadService.doUploadinBackground(UploadService.java:118) 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): at com.android.election2010.UploadService.onHandleIntent(UploadService.java:85) 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:30) 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): at android.os.Handler.dispatchMessage(Handler.java:99) 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): at android.os.Looper.loop(Looper.java:123) 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): at android.os.HandlerThread.run(HandlerThread.java:60) 04-08 11:56:20.496: INFO/Process(4657): Sending signal. PID: 6088 SIG: 3 I guess that as @DroidIn suggests, I need to upload it in chunks. But (newbie question alert) does that mean that I should make multiple PostMethod requests, and glue the file together at the server end? Or can I load the bytestream into memory in chunks, and glue it together in the Android code? If anyone could give me a clue as to the best approach, I would be very grateful.

    Read the article

  • Errors rose when a Netbean Maven Project tries to run

    - by Zakaria
    Hi everybody, I installed NetBeans 6.8 on Vista and and I'm trying to execute a simple Maven Project. When I ran the project, I got this set of errors: WARNING: You are running embedded Maven builds, some build may fail due to incompatibilities with latest Maven release. To set Maven instance to use for building, click here. Scanning for projects... [#process-resources] [resources:resources] Using default encoding to copy filtered resources. [#compile] [compiler:compile] Nothing to compile - all classes are up to date [exec:exec] [EL Info]: 2010-04-04 18:22:54.907--ServerSession(15532856)--EclipseLink, version: Eclipse Persistence Services - 2.0.0.v20091127-r5931 [EL Severe]: 2010-04-04 18:22:54.929--ServerSession(15532856)--Local Exception Stack: Exception [EclipseLink-4003] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DatabaseException Exception in thread "main" javax.persistence.PersistenceException: Exception [EclipseLink-4003] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DatabaseException Exception Description: Configuration error. Class [org.apache.derby.jdbc.ClientDriver] not found. Exception Description: Configuration error. Class [org.apache.derby.jdbc.ClientDriver] not found. at org.eclipse.persistence.exceptions.DatabaseException.configurationErrorClassNotFound(DatabaseException.java:82) at org.eclipse.persistence.sessions.DefaultConnector.loadDriverClass(DefaultConnector.java:267) at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:85) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:392) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151) at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195) at com.mycompany.chapter2_ex1.Main.main(Main.java:31) Caused by: Exception [EclipseLink-4003] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DatabaseException Exception Description: Configuration error. Class [org.apache.derby.jdbc.ClientDriver] not found. at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:368) at org.eclipse.persistence.exceptions.DatabaseException.configurationErrorClassNotFound(DatabaseException.java:82) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151) at org.eclipse.persistence.sessions.DefaultConnector.loadDriverClass(DefaultConnector.java:267) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207) at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:85) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) at com.mycompany.chapter2_ex1.Main.main(Main.java:31) at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:368) ... 4 more [ERROR]The following mojo encountered an error while executing: [ERROR]Group-Id: org.codehaus.mojo [ERROR]Artifact-Id: exec-maven-plugin [ERROR]Version: 1.1.1 [ERROR]Mojo: exec [ERROR]brought in via: Direct invocation [ERROR]While building project: [ERROR]Group-Id: com.mycompany [ERROR]Artifact-Id: chapter2_ex1 [ERROR]Version: 1.0-SNAPSHOT [ERROR]From file: C:\Users\Charlotte\Documents\NetBeansProjects\chapter2_ex1\pom.xml [ERROR]Reason: Result of cmd.exe /X /C ""C:\Program Files\Java\jdk1.6.0_11\bin\java.exe" -classpath C:\Users\Charlotte\Documents\NetBeansProjects\chapter2_ex1\target\classes;C:\Users\Charlotte\.m2\repository\javax\persistence\persistence-api\1.0\persistence-api-1.0.jar;C:\Users\Charlotte\.m2\repository\org\eclipse\persistence\javax.persistence\2.0.0\javax.persistence-2.0.0.jar;C:\Users\Charlotte\.m2\repository\org\eclipse\persistence\eclipselink\2.0.0-RC1\eclipselink-2.0.0-RC1.jar com.mycompany.chapter2_ex1.Main" execution is: '1'. ------------------------------------------------------------------------ For more information, run with the -e flag ------------------------------------------------------------------------ BUILD FAILED ------------------------------------------------------------------------ Total time: 3 seconds Finished at: Sun Apr 04 18:22:55 CEST 2010 Final Memory: 47M/94M ------------------------------------------------------------------------ Theses exceptions rose even if I can run the database by using the console (ij) and when I connect the Database, no errors are showing. Can you help me please? Thank you very much. Regards.

    Read the article

  • Tapestry / JDBC - Storing Date

    - by Ben
    So Im using Tapestry and trying to store a date from a beaneditform into a simple Access database. It wont work, Im getting Null pointer exceptions and I cannot understand why. String onSuccess() { System.out.println("in on success!"); String nextPage = null; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection = DriverManager.getConnection("jdbc:odbc:FYP_Users"); DateFormat df = new SimpleDateFormat("dd/MM/yyyy"); Date ed = occasion.getEventDate(); String reportDate = df.format(ed); statement.executeUpdate("INSERT INTO Events (UserName, EventName, EventDate, EventTime, EventDetails, People, Rating) " + "VALUES ('" + login.getUserName() + "', '" + occasion.getEventName()+ "', '" + reportDate + "', '" + occasion.getEventTime() + "', '" + occasion.getEventDetails() + "', '" + occasion.getPeople() + "', '"+ "1" +"')"); connection.close(); occasion = new Occasion(); //occasion.setUserName(occasion.getUserName()); occasion.setEventName(occasion.getEventName()); occasion.setEventDate(occasion.getEventDate()); occasion.setEventTime(occasion.getEventTime()); occasion.setEventDetails(occasion.getEventDetails()); occasion.setPeople(occasion.getPeople()); //occasion.setRating(occasion.getRating()); nextPage = "UserIndex"; } catch (SQLException e) {e.printStackTrace();} catch (ClassNotFoundException e) {e.printStackTrace();} return nextPage; } Stack trace java.util.Calendar.setTime(Unknown Source) java.text.SimpleDateFormat.format(Unknown Source) java.text.SimpleDateFormat.format(Unknown Source) java.text.DateFormat.format(Unknown Source) myappj.pages.CreateOccasion.onSuccess(CreateOccasion.java:61) myappj.pages.CreateOccasion.dispatchComponentEvent(CreateOccasion.java) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:902) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1081) org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.triggerContextEvent(InternalComponentResourcesImpl.java:263) org.apache.tapestry5.corelib.components.Form._$advised$onAction(Form.java:398) org.apache.tapestry5.corelib.components.Form$onAction$invocation_128ef468876.invokeAdvisedMethod(Form$onAction$invocation_128ef468876.java) org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:71) org.apache.tapestry5.ioc.internal.services.LoggingAdvice.advise(LoggingAdvice.java:37) org.apache.tapestry5.internal.transform.LogWorker$1.advise(LogWorker.java:54) org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:80) org.apache.tapestry5.corelib.components.Form.onAction(Form.java) org.apache.tapestry5.corelib.components.Form.dispatchComponentEvent(Form.java) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:910) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1081) org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:75) org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42) $ComponentEventRequestHandler_128ef45bf4a.handle($ComponentEventRequestHandler_128ef45bf4a.java) org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42) $ComponentEventRequestHandler_128ef45bf4a.handle($ComponentEventRequestHandler_128ef45bf4a.java) org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2164) $ComponentEventRequestHandler_128ef45bf4a.handle($ComponentEventRequestHandler_128ef45bf4a.java) $ComponentEventRequestHandler_128ef45bea5.handle($ComponentEventRequestHandler_128ef45bea5.java) org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43) $ComponentRequestHandler_128ef45be99.handleComponentEvent($ComponentRequestHandler_128ef45be99.java) org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46) $Dispatcher_128ef45be9b.dispatch($Dispatcher_128ef45be9b.java) $Dispatcher_128ef45be92.dispatch($Dispatcher_128ef45be92.java) org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245) org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) $RequestHandler_128ef45be93.service($RequestHandler_128ef45be93.java) org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778) $RequestHandler_128ef45be93.service($RequestHandler_128ef45be93.java) org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767) $RequestHandler_128ef45be93.service($RequestHandler_128ef45be93.java) org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85) $RequestHandler_128ef45be93.service($RequestHandler_128ef45be93.java) myappj.services.AppModule$1.service(AppModule.java:90) $RequestFilter_128ef45be8e.service($RequestFilter_128ef45be8e.java) $RequestHandler_128ef45be93.service($RequestHandler_128ef45be93.java) org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90) org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81) org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103) $RequestHandler_128ef45be93.service($RequestHandler_128ef45be93.java) $RequestHandler_128ef45be88.service($RequestHandler_128ef45be88.java) org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:197) org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53) $HttpServletRequestHandler_128ef45be8a.service($HttpServletRequestHandler_128ef45be8a.java) org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62) $HttpServletRequestFilter_128ef45be87.service($HttpServletRequestFilter_128ef45be87.java) $HttpServletRequestHandler_128ef45be8a.service($HttpServletRequestHandler_128ef45be8a.java) org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726) $HttpServletRequestHandler_128ef45be8a.service($HttpServletRequestHandler_128ef45be8a.java) $HttpServletRequestHandler_128ef45be85.service($HttpServletRequestHandler_128ef45be85.java) org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:127) org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722) org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:404) org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) org.mortbay.jetty.Server.handle(Server.java:324) org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842) org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648) org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

    Read the article

  • Android: OutOfMemoryError while uploading video - how best to chunk?

    - by AP257
    Hi all, I have the same problem as described here, but I will supply a few more details. While trying to upload a video in Android, I'm reading it into memory, and if the video is large I get an OutOfMemoryError. Here's my code: // get bytestream to upload videoByteArray = getBytesFromFile(cR, fileUriString); public static byte[] getBytesFromFile(ContentResolver cR, String fileUriString) throws IOException { Uri tempuri = Uri.parse(fileUriString); InputStream is = cR.openInputStream(tempuri); byte[] b3 = readBytes(is); is.close(); return b3; } public static byte[] readBytes(InputStream inputStream) throws IOException { ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream(); // this is storage overwritten on each iteration with bytes int bufferSize = 1024; byte[] buffer = new byte[bufferSize]; int len = 0; while ((len = inputStream.read(buffer)) != -1) { byteBuffer.write(buffer, 0, len); } return byteBuffer.toByteArray(); } And here's the traceback (the error is thrown on the byteBuffer.write(buffer, 0, len) line): 04-08 11:56:20.456: ERROR/dalvikvm-heap(6088): Out of memory on a 16775184-byte allocation. 04-08 11:56:20.456: INFO/dalvikvm(6088): "IntentService[UploadService]" prio=5 tid=17 RUNNABLE 04-08 11:56:20.456: INFO/dalvikvm(6088): | group="main" sCount=0 dsCount=0 s=N obj=0x449a3cf0 self=0x38d410 04-08 11:56:20.456: INFO/dalvikvm(6088): | sysTid=6119 nice=0 sched=0/0 cgrp=default handle=4010416 04-08 11:56:20.456: INFO/dalvikvm(6088): at java.io.ByteArrayOutputStream.expand(ByteArrayOutputStream.java:~93) 04-08 11:56:20.456: INFO/dalvikvm(6088): at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:218) 04-08 11:56:20.456: INFO/dalvikvm(6088): at com.android.election2010.UploadService.readBytes(UploadService.java:199) 04-08 11:56:20.456: INFO/dalvikvm(6088): at com.android.election2010.UploadService.getBytesFromFile(UploadService.java:182) 04-08 11:56:20.456: INFO/dalvikvm(6088): at com.android.election2010.UploadService.doUploadinBackground(UploadService.java:118) 04-08 11:56:20.456: INFO/dalvikvm(6088): at com.android.election2010.UploadService.onHandleIntent(UploadService.java:85) 04-08 11:56:20.456: INFO/dalvikvm(6088): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:30) 04-08 11:56:20.456: INFO/dalvikvm(6088): at android.os.Handler.dispatchMessage(Handler.java:99) 04-08 11:56:20.456: INFO/dalvikvm(6088): at android.os.Looper.loop(Looper.java:123) 04-08 11:56:20.456: INFO/dalvikvm(6088): at android.os.HandlerThread.run(HandlerThread.java:60) 04-08 11:56:20.467: WARN/dalvikvm(6088): threadid=17: thread exiting with uncaught exception (group=0x4001b180) 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): Uncaught handler: thread IntentService[UploadService] exiting due to uncaught exception 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): java.lang.OutOfMemoryError 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): at java.io.ByteArrayOutputStream.expand(ByteArrayOutputStream.java:93) 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:218) 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): at com.android.election2010.UploadService.readBytes(UploadService.java:199) 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): at com.android.election2010.UploadService.getBytesFromFile(UploadService.java:182) 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): at com.android.election2010.UploadService.doUploadinBackground(UploadService.java:118) 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): at com.android.election2010.UploadService.onHandleIntent(UploadService.java:85) 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:30) 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): at android.os.Handler.dispatchMessage(Handler.java:99) 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): at android.os.Looper.loop(Looper.java:123) 04-08 11:56:20.467: ERROR/AndroidRuntime(6088): at android.os.HandlerThread.run(HandlerThread.java:60) 04-08 11:56:20.496: INFO/Process(4657): Sending signal. PID: 6088 SIG: 3 I guess that as @DroidIn suggests, I need to upload it in chunks. But (newbie question alert) does that mean that I should make multiple PostMethod requests, and glue the file together at the server end? Or can I load the bytestream into memory in chunks, and glue it together in the Android code? If anyone could give me a clue as to the best approach, I would be very grateful.

    Read the article

  • jQuery / jqGrids / Submitting form data troubles...

    - by Kelso
    Ive been messing with jqgrids alot of the last couple days, and I have nearly everything the way I want it from the display, tabs with different grids, etc. Im wanting to make use of Modal for adding and editing elements on my grid. My problem that Im running into is this. I have my editurl:"editsu.php" set, if that file is renamed, on edit, i get a 404 in the modal.. great! However, with that file in place, nothing at all seems to happen. I even put a die("testing"); line at the top, so it sees the file, it just doesnt do anything with it. Below is the content. ........ the index page jQuery("#landings").jqGrid({ url:'server.php?tid=1', datatype: "json", colNames:['ID','Tower','Sector', 'Client', 'VLAN','IP','DLink','ULink','Service','Lines','Freq','Radio','Serial','Mac'], colModel:[ {name:'id', index:'id', width : 50, align: 'center', sortable:true,editable:true,editoptions:{size:10}}, {name:'tower', index:'tower', width : 85, align: 'center', sortable:true,editable:false,editoptions:{readonly:true,size:30}}, {name:'sector', index:'sector', width : 50, align: 'center',sortable:true,editable:true,editoptions:{readonly:true,size:20}}, {name:'customer',index:'customer', width : 175, align: 'left', editable:true,editoptions:{readonly:true,size:35}}, {name:'vlan', index:'vlan', width : 35, align: 'left',editable:true,editoptions:{size:10}}, {name:'suip', index:'suip', width : 65, align: 'left',editable:true,editoptions:{size:20}}, {name:'datadl',index:'datadl', width:55, editable: true,edittype:"select",editoptions:{value:"<? $qr = qquery("select * from datatypes"); while ($q = ffetch($qr)) {echo "$q[id]:$q[name];";}?>"}}, {name:'dataul', index:'dataul', width : 55, editable: true,edittype:"select",editoptions:{value:"<? $qr = qquery("select * from datatypes"); while ($q = ffetch($qr)) {echo "$q[id]:$q[name];";}?>"}}, {name:'servicetype', index:'servicetype', width : 85, editable: true,edittype:"select",editoptions:{value:"<? $qr = qquery("select * from servicetype"); while ($q = ffetch($qr)) {echo "$q[id]:$q[name];";}?>"}}, {name:'voicelines', index:'voicelines', width : 35, align: 'center',editable:true,editoptions:{size:30}}, {name:'freqname', index:'freqname', width : 35, editable: true,edittype:"select",editoptions:{value:"<? $qr = qquery("select * from freqband"); while ($q = ffetch($qr)) {echo "$q[id]:$q[name];";}?>"}}, {name:'radioname', index:'radioname', width : 120, editable: true,edittype:"select",editoptions:{value:"<? $qr = qquery("select * from radiotype"); while ($q = ffetch($qr)) {echo "$q[id]:$q[name];";}?>"}}, {name:'serial', index:'serial', width : 100, align: 'right',editable:true,editoptions:{size:20}}, {name:'mac', index:'mac', width : 120, align: 'right',editable:true,editoptions:{size:20}} ], rowNum:20, rowList:[30,50,70], pager: '#pagerl', sortname: 'sid', mtype: "GET", viewrecords: true, sortorder: "asc", altRows: true, caption:"Landings", editurl:"editsu.php", height:420 }); jQuery("#landings").jqGrid('navGrid','#pagerl',{edit:true,add:true,del:false,search:false},{height:400,reloadAfterSubmit:false},{height:400,reloadAfterSubmit:false},{reloadAfterSubmit:false},{}); now for the editsu.php file.. $operation = $_REQUEST['oper']; if ($operation == "edit") { qquery("UPDATE customers SET vlan = '".$_POST['vlan']."', datadl = '".$_POST['datadl']."', dataul = '".$_POST['dataul']."', servicetype = '".$_POST['servicetype']."', voicelines = '".$_POST['voicelines']."', freqname = '".$_POST['freqname']."', radioname = '".$_POST['radioname']."', serial = '".$_POST['serial']."', mac = '".$_POST['mac']."' WHERE id = '".$_POST['id']."'") or die(mysql_error()); } Im just having a hard time troubleshooting this to figure out where its getting hung up at. My next question after this would be to see if its possible to make it so when you click "add", that it auto inserts a row into the db with a couple variable predtermined and then bring up the modal window, but ill work on the first problem first. thanks!

    Read the article

  • form submitting with mechanize and Python

    - by MATELIN Alexis
    I'm trying to scrap a website that requires to submit two forms : a first one to loggin and a second one to specify my research. I'm using Python and the mechanize package. No problem with the first one, but i just can't figure out how to pass through the second one. Here is the part of my code related to the firm above-mentionned agemin=18 agemax=25 by='region' country='France' region=2 newcustomers=1 browser.select_form(nr=0) browser['age[min]']=agemin browser['age[max]']=agemax browser['country']=country browser['region']=region browser['by']=by browser['new-customers']=newcustomers response=browser.submit() content=response.read() but when I submit the variable 'age[min]' by example, I get the following error message : TypeError: object of type 'int' has no len() to give you some more informations, here is what I get with 'print br.form' <POST http://www.adopteunmec.com/qsearch/ajax_quick application/x-www-form-urlencoded <SelectControl(age[min]=[, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, *30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99])> <SelectControl(age[max]=[, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, *45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99])> <SelectControl(by=[*region, distance])> <SelectControl(country=[*fr, be, ch, ca])> <SelectControl(region=[*1, 2, 3, 4, 5, 6, 7, 8, 22, 23, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 11])> <SelectControl(distance[min]=[*, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500, 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620, 630, 640, 650, 660, 670, 680, 690, 700, 710, 720, 730, 740, 750, 760, 770, 780, 790, 800, 810, 820, 830, 840, 850, 860, 870, 880, 890, 900, 910, 920, 930, 940, 950, 960, 970, 980, 990, 1000])> <SelectControl(distance[max]=[, 0, 10, 20, 30, 40, 50, 60, 70, *80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500, 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620, 630, 640, 650, 660, 670, 680, 690, 700, 710, 720, 730, 740, 750, 760, 770, 780, 790, 800, 810, 820, 830, 840, 850, 860, 870, 880, 890, 900, 910, 920, 930, 940, 950, 960, 970, 980, 990, 1000])> <CheckboxControl(new=[*1])>> My guess is that the form needs an object (like a list) containing all the variables to accept it ; that's why it refuses the variables submited one by one. Thank you in advance for any help ! Alexis

    Read the article

  • IE 11 Developer Tools - changing console target to a different frameset or iframe

    - by vladimirl
    Originally posted on: http://geekswithblogs.net/vladimirl/archive/2013/10/25/ie-11-developer-tools---changing-console-target-to-a.aspxTo change current console iframe/frameset type this into console command line where "contentIFrame" in the iframe/frameset name (there should not be quotes around the iframe name):console.cd(contentIFrame);To return to the top level window, use cd() with no argument:console.cd();It took me some time to find out that this was possible in IE 11 Developer tools. Everything is so much easier in Chrome. No drama. Sometimes I feel that I hate IE more and more. Reference (http://msdn.microsoft.com/en-us/library/ie/dn255006(v=vs.85).aspx#console_in):All script entered in the command line executes in the global scope of the currently selected window. If your webpage is built with a frameset or iframes, those frames load their own documents in their own windows.To target the window of a frameset frame or an iframe, use the cd() command, with the frame/iframe's name or ID attribute as the argument. For example, you have a frame with the name microsoftFrame and you're loading the Microsoft homepage in it.JavaScriptcd(microsoftFrame); Current window: www.microsoft.com/en-us/default.aspx Important  Note that there were no quotes around the name of the frame. Only pass the unquoted name or ID value as the parameter.To return to the top level window, use cd() with no argument.

    Read the article

  • Can't run init script on boot after another init script

    - by Colin McQueen
    I have three init scripts and the Broker init script runs fine, but when I try to run the Consumer init script and then the Data Collector init script, the only process that is running is the Broker. I added the symbolic links to the run levels using update-rc.d for each script and I also changed the number prefixes in the symbolic links to try and run the scripts in the proper order but that did not work. I am able to run the scripts from the terminal and they work fine but they need to all be started on boot. Any ideas as to why my other scripts are not running? Also inside my Consumer and Data Collector I am running: su user1 -c 'java -jar foo.jar' to start the services. Also the Consumer Java class sits and waits for a message from the queue, so the Java code does not stop until I specify the stop argument for the init script. The Broker has to start first, then the Consumer, then the Data Collector. Adding the symbolic links for the runlevels: sudo update-rc.d Broker defaults 10 90 sudo update-rc.d Consumer defaults 15 85 sudo update-rc.d DataCollector defaults 20 80

    Read the article

  • The fastest way to resize images from ASP.NET. And it’s (more) supported-ish.

    - by Bertrand Le Roy
    I’ve shown before how to resize images using GDI, which is fairly common but is explicitly unsupported because we know of very real problems that this can cause. Still, many sites still use that method because those problems are fairly rare, and because most people assume it’s the only way to get the job done. Plus, it works in medium trust. More recently, I’ve shown how you can use WPF APIs to do the same thing and get JPEG thumbnails, only 2.5 times faster than GDI (even now that GDI really ultimately uses WIC to read and write images). The boost in performance is great, but it comes at a cost, that you may or may not care about: it won’t work in medium trust. It’s also just as unsupported as the GDI option. What I want to show today is how to use the Windows Imaging Components from ASP.NET APIs directly, without going through WPF. The approach has the great advantage that it’s been tested and proven to scale very well. The WIC team tells me you should be able to call support and get answers if you hit problems. Caveats exist though. First, this is using interop, so until a signed wrapper sits in the GAC, it will require full trust. Second, the APIs have a very strong smell of native code and are definitely not .NET-friendly. And finally, the most serious problem is that older versions of Windows don’t offer MTA support for image decoding. MTA support is only available on Windows 7, Vista and Windows Server 2008. But on 2003 and XP, you’ll only get STA support. that means that the thread safety that we so badly need for server applications is not guaranteed on those operating systems. To make it work, you’d have to spin specialized threads yourself and manage the lifetime of your objects, which is outside the scope of this article. We’ll assume that we’re fine with al this and that we’re running on 7 or 2008 under full trust. Be warned that the code that follows is not simple or very readable. This is definitely not the easiest way to resize an image in .NET. Wrapping native APIs such as WIC in a managed wrapper is never easy, but fortunately we won’t have to: the WIC team already did it for us and released the results under MS-PL. The InteropServices folder, which contains the wrappers we need, is in the WicCop project but I’ve also included it in the sample that you can download from the link at the end of the article. In order to produce a thumbnail, we first have to obtain a decoding frame object that WIC can use. Like with WPF, that object will contain the command to decode a frame from the source image but won’t do the actual decoding until necessary. Getting the frame is done by reading the image bytes through a special WIC stream that you can obtain from a factory object that we’re going to reuse for lots of other tasks: var photo = File.ReadAllBytes(photoPath); var factory = (IWICComponentFactory)new WICImagingFactory(); var inputStream = factory.CreateStream(); inputStream.InitializeFromMemory(photo, (uint)photo.Length); var decoder = factory.CreateDecoderFromStream( inputStream, null, WICDecodeOptions.WICDecodeMetadataCacheOnLoad); var frame = decoder.GetFrame(0); We can read the dimensions of the frame using the following (somewhat ugly) code: uint width, height; frame.GetSize(out width, out height); This enables us to compute the dimensions of the thumbnail, as I’ve shown in previous articles. We now need to prepare the output stream for the thumbnail. WIC requires a special kind of stream, IStream (not implemented by System.IO.Stream) and doesn’t directlyunderstand .NET streams. It does provide a number of implementations but not exactly what we need here. We need to output to memory because we’ll want to persist the same bytes to the response stream and to a local file for caching. The memory-bound version of IStream requires a fixed-length buffer but we won’t know the length of the buffer before we resize. To solve that problem, I’ve built a derived class from MemoryStream that also implements IStream. The implementation is not very complicated, it just delegates the IStream methods to the base class, but it involves some native pointer manipulation. Once we have a stream, we need to build the encoder for the output format, which could be anything that WIC supports. For web thumbnails, our only reasonable options are PNG and JPEG. I explored PNG because it’s a lossless format, and because WIC does support PNG compression. That compression is not very efficient though and JPEG offers good quality with much smaller file sizes. On the web, it matters. I found the best PNG compression option (adaptive) to give files that are about twice as big as 100%-quality JPEG (an absurd setting), 4.5 times bigger than 95%-quality JPEG and 7 times larger than 85%-quality JPEG, which is more than acceptable quality. As a consequence, we’ll use JPEG. The JPEG encoder can be prepared as follows: var encoder = factory.CreateEncoder( Consts.GUID_ContainerFormatJpeg, null); encoder.Initialize(outputStream, WICBitmapEncoderCacheOption.WICBitmapEncoderNoCache); The next operation is to create the output frame: IWICBitmapFrameEncode outputFrame; var arg = new IPropertyBag2[1]; encoder.CreateNewFrame(out outputFrame, arg); Notice that we are passing in a property bag. This is where we’re going to specify our only parameter for encoding, the JPEG quality setting: var propBag = arg[0]; var propertyBagOption = new PROPBAG2[1]; propertyBagOption[0].pstrName = "ImageQuality"; propBag.Write(1, propertyBagOption, new object[] { 0.85F }); outputFrame.Initialize(propBag); We can then set the resolution for the thumbnail to be 96, something we weren’t able to do with WPF and had to hack around: outputFrame.SetResolution(96, 96); Next, we set the size of the output frame and create a scaler from the input frame and the computed dimensions of the target thumbnail: outputFrame.SetSize(thumbWidth, thumbHeight); var scaler = factory.CreateBitmapScaler(); scaler.Initialize(frame, thumbWidth, thumbHeight, WICBitmapInterpolationMode.WICBitmapInterpolationModeFant); The scaler is using the Fant method, which I think is the best looking one even if it seems a little softer than cubic (zoomed here to better show the defects): Cubic Fant Linear Nearest neighbor We can write the source image to the output frame through the scaler: outputFrame.WriteSource(scaler, new WICRect { X = 0, Y = 0, Width = (int)thumbWidth, Height = (int)thumbHeight }); And finally we commit the pipeline that we built and get the byte array for the thumbnail out of our memory stream: outputFrame.Commit(); encoder.Commit(); var outputArray = outputStream.ToArray(); outputStream.Close(); That byte array can then be sent to the output stream and to the cache file. Once we’ve gone through this exercise, it’s only natural to wonder whether it was worth the trouble. I ran this method, as well as GDI and WPF resizing over thirty twelve megapixel images for JPEG qualities between 70% and 100% and measured the file size and time to resize. Here are the results: Size of resized images   Time to resize thirty 12 megapixel images Not much to see on the size graph: sizes from WPF and WIC are equivalent, which is hardly surprising as WPF calls into WIC. There is just an anomaly for 75% for WPF that I noted in my previous article and that disappears when using WIC directly. But overall, using WPF or WIC over GDI represents a slight win in file size. The time to resize is more interesting. WPF and WIC get similar times although WIC seems to always be a little faster. Not surprising considering WPF is using WIC. The margin of error on this results is probably fairly close to the time difference. As we already knew, the time to resize does not depend on the quality level, only the size does. This means that the only decision you have to make here is size versus visual quality. This third approach to server-side image resizing on ASP.NET seems to converge on the fastest possible one. We have marginally better performance than WPF, but with some additional peace of mind that this approach is sanctioned for server-side usage by the Windows Imaging team. It still doesn’t work in medium trust. That is a problem and shows the way for future server-friendly managed wrappers around WIC. The sample code for this article can be downloaded from: http://weblogs.asp.net/blogs/bleroy/Samples/WicResize.zip The benchmark code can be found here (you’ll need to add your own images to the Images directory and then add those to the project, with content and copy if newer in the properties of the files in the solution explorer): http://weblogs.asp.net/blogs/bleroy/Samples/WicWpfGdiImageResizeBenchmark.zip WIC tools can be downloaded from: http://code.msdn.microsoft.com/wictools To conclude, here are some of the resized thumbnails at 85% fant:

    Read the article

  • Sync custom AD properties to SharePoint Profile

    - by KunaalKapoor
    Here are some step-by-step instructions regarding configuring SharePoint to sync with custom AD attributes:Add the custom attribute in Active DirectoryThis part will have to be your doing; here is some documentation regarding creating customattributes in AD:http://msdn.microsoft.com/en-us/library/ms675085(VS.85).aspxhttp://technet.microsoft.com/en-us/magazine/2008.05.schema.aspxhttp://blogs.technet.com/b/isingh/archive/2007/02/18/adding-custom-attributes-in-active-directory.aspx2. Open up the miisclient.exe (C:\Program Files\Microsoft Office Servers\14.0\Synchronization Service\UIShell\miisclient.exe)a. This will have to be opened up with the farm admin account3. Click on "Management Agents" in the ribbon4. Right-click the Active Directory Management Agent ("MOSS-<name of sync connection>") and click "Refresh Schema"a. When prompted, enter the credentials for the farm account5. Once complete, close out of miisclient.exe6. Go into Central Admin --> Application Management --> Manage Service Applications --> Go into the User Profile Service Application7. Click on "Manage User Properties"8. Click on "New Property"9. Put in the correct information regarding the attribute that was created10. At the bottom of this page, under the "Source Data Connection" drop down, select the AD synchronization connection you have already configured11. For the "Attribute" drop down, select the new attribute you have created12. For the "Direction" drop down, select "Import"13. Click "OK"14. Run a full synchronization for the user profile service application and the custom property will get synced (as long as the attribute is set in Active Directory for the desired users)

    Read the article

  • Nautilus crashes after Ubuntu Tweak Package Cleaner [fixed]

    - by Ka7anax
    Few days ago I started having some problems with nautilus. Basically when I'm trying to get into a folder it crashes. It's not happening all the time, but in 85% it does... Sometimes, after the crash all my desktop icons are also gone. The only thing that I think causes this is Ubuntu Tweak - I'm not sure, but the issues started after I did the Package cleaner from Ubuntu Tweaks... Any ideas? ------- EDIT 2 - IMPORTANT !!! ---------- It seems I fixed this problem doing these: 1) I uninstall this nautilus script - http://mundogeek.net/nautilus-scripts/#nautilus-send-gmail 2) I installed nautilus elementary So far is back to normal... If anything bad happens again I will come back! -------- EDIT 1 ---------- First time, after running the command (nautilus --quit; nautilus --no-desktop) 3 times all the system crashed (except the mouse, I could move the mouse). After restart I run it and obtain this: ----- Initializing nautilus-gdu extension Initializing nautilus-dropbox 0.6.7 (nautilus:2966): GConf-CRITICAL **: gconf_value_free: assertion value != NULL' failed (nautilus:2966): GConf-CRITICAL **: gconf_value_free: assertionvalue != NULL' failed Nautilus-Share-Message: Called "net usershare info" but it failed: 'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error No such file or directory Please ask your system administrator to enable user sharing. and then this: cristi@cris-laptop:~$ nautilus --quit; nautilus --no-desktop (nautilus:3810): Unique-DBus-WARNING **: Error while sending message: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

    Read the article

  • Installing mysql-server on 10.04LTS gives "404 Not Found" error

    - by bc1
    Hi I am trying to install mysql on Ubuntu 10.04LTS (Lucid Lynx) and I am getting this error. Is this a server side issue - is the server up? I am running this from the command line on a remote server... sudo apt-get install mysql-server Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient16 libnet-daemon-perl libplrpc-perl mysql-client-5.1 mysql-client-core-5.1 mysql-common mysql-server-5.1 mysql-server-core-5.1 psmisc Suggested packages: dbishell libipc-sharedcache-perl tinyca mailx The following NEW packages will be installed: libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient16 libnet-daemon-perl libplrpc-perl mysql-client-5.1 mysql-client-core-5.1 mysql-common mysql-server mysql-server-5.1 mysql-server-core-5.1 psmisc 0 upgraded, 13 newly installed, 0 to remove and 85 not upgraded. Need to get 23.2MB/24.3MB of archives. After this operation, 61.7MB of additional disk space will be used. Do you want to continue [Y/n]? Y Err http://archive.ubuntu.com/ubuntu/ lucid-updates/main mysql-common 5.1.62-0ubuntu0.10.04.1 404 Not Found [IP: 91.189.92.192 80] <more of the same error messages here> Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-dfsg-5.1/mysql-common_5.1.62-0ubuntu0.10.04.1_all.deb 404 Not Found [IP: 91.189.92.166 80] <more of the same error messages here> E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

    Read the article

  • Problem with SNMP and MIBs

    - by jap1968
    I am installing Zabbix to monitor via snmp some devices from a machine running Ubuntu 12.04 server. There is a problem with MIB definitions, since snmp commands do no properly translate some of the MIBs. I have already installed the "snmp-mibs-downloader" package, so the files containing the MIB descriptions are properly installed. The MIB are only translated to obtain the numeric key (the MIB files are accessible to the snmp commands), but the results returned by the snmpget command do not properly translate the key. The zabbix templates that I am using do expect the key translated (SNMPv2-MIB::sysUpTime.0) , so, the current results are not recognised and these are ignored. Test case: $ snmptranslate -On SNMPv2-MIB::sysUpTime.0 .1.3.6.1.2.1.1.3.0 $ snmpget -v 2c -c public 192.168.1.1 1.3.6.1.2.1.1.3.0 iso.3.6.1.2.1.1.3.0 = Timeticks: (2911822510) 337 days, 0:23:45.10 On another machine (running a very old Red Hat based distribution), the snmp commands perform both, the directe and reverse traslation, as expected: # snmptranslate -On SNMPv2-MIB::sysUpTime.0 .1.3.6.1.2.1.1.3.0 # snmpget -v 2c -c public 192.168.1.1 1.3.6.1.2.1.1.3.0 SNMPv2-MIB::sysUpTime.0 = Timeticks: (2911819485) 337 days, 0:23:14.85 What is the problem on my Ubuntu box? Is there something I am missing?

    Read the article

  • How to send mass email and not get treated as spam

    - by MonsterMMORPG
    I am the owner of http://www.monstermmorpg.com which is a free to play browser based monster role playing game. I have a very important announcement to send my above 300k members. I already have email sending software but they drop to the spam. So i want to improve my chances of dropping inbox. I am going to give you all details. Alright my domain registrar is : http://www.godaddy.com/ My hosting company is : http://www.leaseweb.com/en This is my setting at leaseweb: This is my DNS settings at Godaddy: This is how I send emails: MailMessage mail = new MailMessage(); mail.To.Add(EmailAdress); mail.From = new MailAddress("MonsterMMORPG NoReplay <[email protected]>"); mail.Subject = "Title Of Mail"; string Body = "Body Of Mail"; mail.Body = Body; mail.IsBodyHtml = true; SmtpClient smtp = new SmtpClient(); smtp.DeliveryMethod = SmtpDeliveryMethod.Network; smtp.UseDefaultCredentials = true; smtp.Host = "85.17.154.139"; smtp.Port = 25; smtp.Send(mail); Thanks for every kind of answer. I did not make any special setting at SMTP:

    Read the article

  • I spoke at SQL Saturday #77 and all I got was this really awesome speaker's shirt!

    - by Most Valuable Yak (Rob Volk)
    Yeah, it was 2 weeks ago, but I'm finally blogging about something! I presented Revenge: The SQL! at SQL Saturday #77 in Pensacola on June 4.  The session abstract is here, and you can download the slides from that page too.  You can see how I look in the speaker's shirt here. Overall it went pretty well.  I discovered a new bit of evil just that morning and in a carefully considered, agonizing decision-making process that was full documented, tested, and approved…nah, I just went ahead and added it at the last minute.  Which worked out even better than (not) planned, since it screwed me up a bit and made my point perfectly.  I had a few fans in the audience, and one of them recorded it for blackmail material posterity. I'd like to thank Karla Landrum (blog | twitter) and all the volunteers for putting together such a great event, and for being kind enough to let me present. (Note to Karla: I'll get the next $100 to you as soon as I can.  Might need a few extra days on the next $100.) Thanks to Audrey (blog | twitter), Peg, and Dorothy for attending and keeping the heckling down.  Thanks also to Aaron (blog | twitter) for providing room and board and also not heckling.  Thanks to Julie (blog | twitter) for coming up with the title for the presentation.  (boo to Julie for getting sick and bailing out on us)  And thanks to all of them for listening to a preview and offering their suggestions and advice! Cross your fingers that I get accepted at SQL Saturday 81 in Birmingham, SQL Saturday 85 in Orlando, or SQL Saturday 89 in Atlanta, or just attend them anyway!

    Read the article

  • Push or Pull Mobile Coupons?

    - by David Dorf
    Mobile phones allow consumers to receive coupons in context, which increases their relevance and therefore redemption rates. Using your current location, you can get coupons that can be redeemed nearby for the things you want now. Receiving a coupon for something you wanted last week or something you might buy next month just isn't as valuable. I previously talked about Placecast and their concept of pushing offers to mobile phones that transgress "geo-fences" around points of interest, like store locations. This push model is an automatic reminder there are good deals just up ahead. This model works well in dense cities where people walk, but I question how effective it will be in the suburbs where people are driving. McDonald's recently ran a campaign in Finland where they pushed offers to GPS devices when cars neared their restaurants. Amazingly, they achieved a 7% click-through rate. But 8coupons.com sees things differently. They prefer the pull model that requires customers to initiate a search for nearby coupons, and they've done some studies to better understand what "nearby" means. It turns out that there are concentric search circles that emanate from your home and work. From inner to outer, people search for food, drink, shopping, and entertainment. Intuitively, that feels about right. So the question is, do consumers prefer the push or pull model for offers? No doubt the market is big enough for both. These days its not good enough to just know who your customers are -- you also need to know where they are so you can catch them in the right moment. According to Borrell Associates, redemption rates of mobile coupons are 10x that of traditional mail and newspaper coupons. One thing is for sure; assuming 85% of consumers regularly spend money within 5 miles of home and work, location-based coupons make tons of sense.

    Read the article

  • How to ignore certain coding standard errors in PHP CodeSniffer

    - by Tom
    We have a PHP 5 web application and we're currently evaluating PHP CodeSniffer in order to decide whether forcing code standards improves code quality without causing too much of a headache. If it seems good we will add a SVN pre-commit hook to ensure all new files committed on the dev branch are free from coding standard smells. Is there a way to configure PHP codeSniffer to ignore a particular type of error? or get it to treat a certain error as a warning instead? Here an example to demonstrate the issue: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> <div> <?php echo getTabContent('Programming', 1, $numX, $numY); if (isset($msg)) { echo $msg; } ?> </div> </body> </html> And this is the output of PHP_CodeSniffer: > phpcs test.php -------------------------------------------------------------------------------- FOUND 2 ERROR(S) AND 1 WARNING(S) AFFECTING 3 LINE(S) -------------------------------------------------------------------------------- 1 | WARNING | Line exceeds 85 characters; contains 121 characters 9 | ERROR | Missing file doc comment 11 | ERROR | Line indented incorrectly; expected 0 spaces, found 4 -------------------------------------------------------------------------------- I have a issue with the "Line indented incorrectly" error. I guess it happens because I am mixing the PHP indentation with the HTML indentation. But this makes it more readable doesn't it? (taking into account that I don't have the resouces to move to a MVC framework right now). So I'd like to ignore it please.

    Read the article

  • Installing e text editor

    - by kristian nissen
    I am trying to get e-text editor to run. I read http://www.e-texteditor.com/forum/viewtopic.php?p=14953#14953 and Compile e-text editor on Linux as well. But on my 10.04 Lucid it fails at the following step: ./build_externals_linux.sh debug with the following error messages: Building debug binaries Building 32-bit binaries Going to place output in /opt/etexteditor/external/out.debug ./build_externals_linux.sh: line 41: pushd: bakefile: No such file or directory ./build_externals_linux.sh: line 42: ./configure: No such file or directory Cannot compile bakefile ./build_externals_linux.sh: line 46: popd: directory stack empty ./build_externals_linux.sh: line 49: pushd: metakit: No such file or directory ./build_externals_linux.sh: line 50: cd: builds: No such file or directory Cannot compile MetaKit ./build_externals_linux.sh: line 56: popd: directory stack empty ./build_externals_linux.sh: line 59: pushd: pcre: No such file or directory ./build_externals_linux.sh: line 60: ./configure: No such file or directory Cannot compile pcre ./build_externals_linux.sh: line 66: popd: directory stack empty ./build_externals_linux.sh: line 69: pushd: tinyxml: No such file or directory make: *** No rule to make target `clean'. Stop. cannot compile TinyXML ./build_externals_linux.sh: line 77: popd: directory stack empty ./build_externals_linux.sh: line 80: pushd: libtommath: No such file or directory make: *** No rule to make target `clean'. Stop. Cannot compile LTM ./build_externals_linux.sh: line 85: popd: directory stack empty ./build_externals_linux.sh: line 88: pushd: libtomcrypt: No such file or directory make: *** No rule to make target `clean'. Stop. Cannot compile LTC ./build_externals_linux.sh: line 93: popd: directory stack empty ./build_externals_linux.sh: line 96: pushd: wxwidgets: No such file or directory ./build_externals_linux.sh: line 97: ./configure: No such file or directory Cannot compile wxWidgets ./build_externals_linux.sh: line 104: popd: directory stack empty ./build_externals_linux.sh: line 107: pushd: webkit: No such file or directory make: *** No rule to make target `clean'. Stop. ./build_externals_linux.sh: line 109: ./WebKitTools/Scripts/build-webkit: No such file or directory Cannot compile WebKit ./build_externals_linux.sh: line 113: popd: directory stack empty what am I missing?

    Read the article

  • Items cannot be installed or removed

    - by Gyanendra Kumar Gyan
    installArchives() failed: (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 136187 files and directories currently installed.) Removing pidgin-ppa ... gpg: key "67265EB522BDD6B1C69E66ED7FB8BEE0A1F196A8" not found: eof gpg: 67265EB522BDD6B1C69E66ED7FB8BEE0A1F196A8: delete key failed: eof dpkg: error processing pidgin-ppa (--remove): subprocess installed post-removal script returned error exit status 2 No apport report written because MaxReports is reached already Processing triggers for ureadahead ... ureadahead will be reprofiled on next reboot Errors were encountered while processing: pidgin-ppa Error in function: SystemError: E:Sub-process /usr/bin/dpkg returned an error code (1)

    Read the article

  • Nautilus crashes after Ubuntu Tweak Package Cleaner

    - by Ka7anax
    Few days ago I started having some problems with nautilus. Basically when I'm trying to get into a folder it crashes. It's not happening all the time, but in 85% it does... Sometimes, after the crash all my desktop icons are also gone. The only thing that I think causes this is Ubuntu Tweak - I'm not sure, but the issues started after I did the Package cleaner from Ubuntu Tweaks... Any ideas? -------- EDIT ---------- First time, after running the command (nautilus --quit; nautilus --no-desktop) 3 times all the system crashed (except the mouse, I could move the mouse). After restart I run it and obtain this: ----- Initializing nautilus-gdu extension Initializing nautilus-dropbox 0.6.7 (nautilus:2966): GConf-CRITICAL **: gconf_value_free: assertion value != NULL' failed (nautilus:2966): GConf-CRITICAL **: gconf_value_free: assertionvalue != NULL' failed Nautilus-Share-Message: Called "net usershare info" but it failed: 'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error No such file or directory Please ask your system administrator to enable user sharing. and then this: cristi@cris-laptop:~$ nautilus --quit; nautilus --no-desktop (nautilus:3810): Unique-DBus-WARNING **: Error while sending message: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

    Read the article

  • New way of integrating Openfeint in Cocos2d-x 0.12.0

    - by Ef Es
    I am trying to implement OpenFeint for Android in my cocos2d-x project. My approach so far has been creating a button that calls a static java method in class Bridge using jnihelper functions (jnihelper only accepts statics). Bridge has one singleton attribute of type OFAndroid, that is the class dynamically calling the Openfeint Api methods, and every method in the bridge just forwards it to the OFAndroid object. What I am trying to do now is to initialize the openfeint libraries in the main java class that is the one calling the static C++ libraries. My problem right now is that the initializing function void com.openfeint.api.OpenFeint.initialize(Context ctx, OpenFeintSettings settings, OpenFeintDelegate delegate) is not accepting the context parameter that I am giving him, which is a "this" reference to the main class. Main class extends from Cocos2dxActivity but I don't have any other that extends from Application. Any suggestions on fixing it or how to improve the architecture? EDIT: I am trying a new solution. Make the bridge class into an Application child, is called from Main object, initializes OpenFeint when created and it can call the OpenFeint functions instead of needing an additional class. The problem is I still get the error. 03-30 14:39:22.661: E/AndroidRuntime(9029): Caused by: java.lang.NullPointerException 03-30 14:39:22.661: E/AndroidRuntime(9029): at android.content.ContextWrapper.getPackageManager(ContextWrapper.java:85) 03-30 14:39:22.661: E/AndroidRuntime(9029): at com.openfeint.internal.OpenFeintInternal.validateManifest(OpenFeintInternal.java:885) 03-30 14:39:22.661: E/AndroidRuntime(9029): at com.openfeint.internal.OpenFeintInternal.initializeWithoutLoggingIn(OpenFeintInternal.java:829) 03-30 14:39:22.661: E/AndroidRuntime(9029): at com.openfeint.internal.OpenFeintInternal.initialize(OpenFeintInternal.java:852) 03-30 14:39:22.661: E/AndroidRuntime(9029): at com.openfeint.api.OpenFeint.initialize(OpenFeint.java:47) 03-30 14:39:22.661: E/AndroidRuntime(9029): at nurogames.fastfish.NuroFeint.onCreate(NuroFeint.java:23) 03-30 14:39:22.661: E/AndroidRuntime(9029): at nurogames.fastfish.FastFish.onCreate(FastFish.java:47) 03-30 14:39:22.661: E/AndroidRuntime(9029): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1069) 03-30 14:39:22.661: E/AndroidRuntime(9029): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2751)

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >