Search Results

Search found 146 results on 6 pages for 'michel'.

Page 3/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • "Conversion to Dalvik format failed with error 1" on external Jar

    - by michel
    In my Android appliction in eclipse I get the following error: UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException: already added: Lorg/xmlpull/v1/XmlPullParser; .... Conversion to Dalvik format failed with error 1 this error only appears if I add a specific external Jar to my project. I search long time to the right solution but all possible solutions don't work. I even tried to change to android 1.6 instead of 1.5(current version I use)

    Read the article

  • insert a BLOB via a sql script ?

    - by David Michel
    Hi, I have an H2 database (http://www.h2database.com) and I'd like to insert a file into a BLOB field via a plain simple sql script (to populate a test database for instance). I know how to do that via the code but I cannot find how to do the sql script itself. I tried to pass the path , i.e. INSERT INTO mytable (id,name,file) VALUES(1,'file.xml',/my/local/path/file.xml); but this fails. Within the code (java for instance), it's easy to create a File object and pass that in, but directly from a sql script, I'm stuck... Any idea ? David

    Read the article

  • 'normal' SVC versus 'Silverlight' SVC (WCF)

    - by Michel
    Hi, i'm trying to call a WCF service from my Silverlight 3 app. But... when trying to create a 'silverlight enabled wcf service' in my web project, my VS2008 crashes during creating the item (i think while editing the web.config). So i thought: let's create a 'normal' wcf service, and manually edit it to be a 'silverlight enabled webservice'. So i wondered what the differences are, and second: why is there a difference between a service called from a silverlight app and a non-silverlight app? This is what i have now for the binding (i have a service without an Interface contract, just a direct class exposed, to begin with): <system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="RadControlsSilverlightApp1.Web.GetNewDataBehavior"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> </serviceBehaviors> </behaviors> <bindings> <customBinding> <binding name="customBinding0"> <binaryMessageEncoding /> <httpTransport /> </binding> </customBinding> </bindings> <serviceHostingEnvironment aspNetCompatibilityEnabled="true" /> <services> <service behaviorConfiguration="RadControlsSilverlightApp1.Web.GetNewDataBehavior" name="RadControlsSilverlightApp1.Web.GetNewData"> <endpoint address="" binding="customBinding" bindingConfiguration="customBinding0" contract="RadControlsSilverlightApp1.Web.GetNewData" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> </services> </system.serviceModel> This one doesn't work because when i add a reference to it from the silverlight app i get these messages: Warning 2 Custom tool warning: Cannot import wsdl:portType Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter Error: Exception has been thrown by the target of an invocation. XPath to Error Source: //wsdl:definitions[@targetNamespace='']/wsdl:portType[@name='GetNewData'] C:\Silverlight\RadControlsSilverlightApp1\RadControlsSilverlightApp1\Service References\ServiceReference1\Reference.svcmap 1 1 RadControlsSilverlightApp1 Warning 3 Custom tool warning: Cannot import wsdl:binding Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on. XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='']/wsdl:portType[@name='GetNewData'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='CustomBinding_GetNewData'] C:\Silverlight\RadControlsSilverlightApp1\RadControlsSilverlightApp1\Service References\ServiceReference1\Reference.svcmap 1 1 RadControlsSilverlightApp1 Warning 4 Custom tool warning: Cannot import wsdl:port Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on. XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='CustomBinding_GetNewData'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='GetNewData']/wsdl:port[@name='CustomBinding_GetNewData'] C:\Silverlight\RadControlsSilverlightApp1\RadControlsSilverlightApp1\Service References\ServiceReference1\Reference.svcmap 1 1 RadControlsSilverlightApp1 Warning 5 Custom tool warning: No endpoints compatible with Silverlight 3 were found. The generated client class will not be usable unless endpoint information is provided via the constructor. C:\Silverlight\RadControlsSilverlightApp1\RadControlsSilverlightApp1\Service References\ServiceReference1\Reference.svcmap 1 1 RadControlsSilverlightApp1 (ps., the service can be started in the browser, i get this: svcutil.exe http://localhost:9599/GetNewData.svc?wsdl )

    Read the article

  • optimize query: get al votes from user's item

    - by Toni Michel Caubet
    hi there! i did it my way because i'm very bad getting results from two tables... Basically, first i get all the id items that correspond to the user, and then i calculate the ratings of each item. But, there is two different types of object item, so i do this 2 times: show you: function votos_usuario($id){ $previa = "SELECT id FROM preguntas WHERE id_usuario = '$id'"; $r_previo = mysql_query($previa); $ids_p = '0, '; while($items_previos = mysql_fetch_array($r_previo)){ $ids_p .= $items_previos['id'].", "; //echo "ids pregunta usuario: ".$items_previos['id']."<br>"; } $ids = substr($ids_p,0,-2); //echo $ids; $consulta = "SELECT valor FROM votos_pregunta WHERE id_pregunta IN ( $ids )"; //echo $consulta; $resultado = mysql_query($consulta); $votos_preguntas = 0; while($voto = mysql_fetch_array($resultado)){ $votos_preguntas = $votos_preguntas + $voto['valor']; } $previa_r = "SELECT id FROM recetas WHERE id_usuario = '$id'"; $r_previo_r = mysql_query($previa_r); $ids_r = '0, '; while($items_previos_r = mysql_fetch_array($r_previo_r)){ $ids_r .= $items_previos_r['id'].", "; //echo "ids pregunta usuario: ".$items_previos['id']."<br>"; } $ids = substr($ids_r,0,-2); $consulta_b = "SELECT valor FROM votos_receta WHERE id_receta IN ( $ids )"; //echo $consulta; $resultado_b = mysql_query($consulta_b); $votos_recetas = 0; while($voto_r = mysql_fetch_array($resultado_b)){ $votos_recetas = $votos_recetas + $voto_r['valor']; } $total = $votos_preguntas + $votos_recetas; return $total; } As you can si this is two much.. O(n^2) Feel like thinking? thanks!

    Read the article

  • Checkstyle: cannot summarise issues per author ?

    - by David Michel
    Hi all, I'm trying to use checkstyle for a java project but I can't seem to get it working properly: While it apparently runs smoothly, the html report doesn't give any info per authors as it should, i.e. the authors table is empty. The thing is I don't know how checkstyle identify an author. Does it look at the java doc tag @author ? at the class level or at the method level ? The ant task I used is below: <taskdef resource="checkstyletask.properties" classpath="${libs.dir}/checkstyle-all-5.0.jar"/> <target name="checkstyle" description="Generates a report of code convention violations."> <mkdir dir="${checkstyle.dir}"/> <checkstyle config="${util.dir}/checkstyle/sun_checks.xml" failureProperty="checkstyle.failure" failOnViolation="false"> <formatter type="xml" tofile="${checkstyle.dir}/checkstyle_report.xml"/> <fileset dir="${src.dir}" includes="**/*.java"/> </checkstyle> <xslt in="${checkstyle.dir}/checkstyle_report.xml" out="${checkstyle.dir}/checkstyle_report.html" style="${util.dir}/checkstyle/checkstyle-author.xsl"/> </target> Many thanks for your help David

    Read the article

  • using xml type attribute for derived complex types

    - by David Michel
    Hi All, I'm trying to get derived complex types from a base type in an xsd schema. it works well when I do this (inspired by this): xml file: <person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Employee"> <name>John</name> <height>59</height> <jobDescription>manager</jobDescription> </person> xsd file: <xs:element name="person" type="Person"/> <xs:complexType name="Person" abstract="true"> <xs:sequence> <xs:element name= "name" type="xs:string"/> <xs:element name= "height" type="xs:double" /> </xs:sequence> </xs:complexType> <xs:complexType name="Employee"> <xs:complexContent> <xs:extension base="Person"> <xs:sequence> <xs:element name="jobDescription" type="xs:string" /> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> However, if I want to have the person element inside, for example, a sequence of another complex type, it doesn't work anymore: xml: <staffRecord> <company>mycompany</company> <dpt>sales</dpt> <person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="Employee"> <name>John</name> <height>59</height> <jobDescription>manager</jobDescription> </person> </staffRecord> xsd file: <xs:element name="staffRecord"> <xs:complexType> <xs:sequence> <xs:element name="company" type="xs:string"/> <xs:element name="dpt" type="xs:string"/> <xs:element name="person" type="Person"/> <xs:complexType name="Person" abstract="true"> <xs:sequence> <xs:element name= "name" type="xs:string"/> <xs:element name= "height" type="xs:double" /> </xs:sequence> </xs:complexType> <xs:complexType name="Employee"> <xs:complexContent> <xs:extension base="Person"> <xs:sequence> <xs:element name="jobDescription" type="xs:string" /> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> </xs:sequence> </xs:complexType> </xs:element> When validating the xml with that schema with xmllint (under linux), I get this error message then: config.xsd:12: element complexType: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}sequence': The content is not valid. Expected is (annotation?, (element | group | choice | sequence | any)*). WXS schema config.xsd failed to compile Any idea what is wrong ? David

    Read the article

  • silverlight: Change the uri to my dataservice after deployment

    - by Michel
    Hi, i've made a service reference from my silverlight app to my local dev server. but now i want to deploy this on the testserver, but how can i change the uri of the dataservice now? all i deploy is a XAP file, and in the asp.net world i was used to change the uri in the web.config, but obviously that isn't present in a silverlight app?

    Read the article

  • .Net SvcUtil: attributes must be optional

    - by Michel van Engelen
    Hi, I'm trying to generate C# code classes with SvcUtil.exe instead of Xsd.exe. The latter is giving me some problems. Command line: SvcUtil.exe myschema.xsd /dconly /ser:XmlSerializer Several SvcUtil problems are described and solved here: http://blog.shutupandcode.net/?p=761 One problem I can't solve is this one: Error: Type 'DatafieldDescription' in namespace '' cannot be imported. Attributes must be optional and from namespace 'http://schemas.microsoft.com/2003/10/Seri alization/'. Either change the schema so that the types can map to data contract types or use ImportXmlType or use a different serializer. ' I changed <xs:attribute name="Order" use="required"> to <xs:attribute name="Order" use="optional"> and <xs:attribute name="Order"> But the error remains. Is it possible to use attributes, or do I have to delete them all (in that case, this excercition is over)?

    Read the article

  • Save entity with entity framework

    - by Michel
    Hi, I'm saving entities/records with the EF, but i'm curious if there is another way of doing it. I receive a class from a MVC controller method, so basicly i have all the info: the class's properties, including the primary key. Without EF i would do a Sql update (update table set a=b, c=d where id = 5), but with EF i got no further than this: Get an object with ID of 5 Update the (existing) object with the new object Submitchanges. What bothers me is that i have to get the object from the database first, where i have all the info to do an update statement. Is there another way of doing this?

    Read the article

  • Catch all exceptions in Scala 2.8 RC1

    - by Michel Krämer
    I have the following dummy Scala code in the file test.scala: class Transaction { def begin() {} def commit() {} def rollback() {} } object Test extends Application { def doSomething() {} val t = new Transaction() t.begin() try { doSomething() t.commit() } catch { case _ => t.rollback() } } If I compile this on Scala 2.8 RC1 with scalac -Xstrict-warnings test.scala I'll get the following warning: test.scala:16: warning: catch clause swallows everything: not advised. case _ => t.rollback() ^ one warning found So, if catch-all expressions are not advised, how am I supposed to implement such a pattern instead? And apart from that why are such expressions not advised anyhow?

    Read the article

  • how to bind the click event of a button and the selecteditemchanged of a listbox to a viewmodel in m

    - by Michel
    Hi, i'm just starting with the mvvm model in Silverlight. In step 1 i got a listbox bound to my viewmodel, but now i want to propagate a click in a button and a selecteditemchanged of the listbox back to the viewmodel. I guess i have to bind the click event of the button and the selecteditemchanged of the listbox to 2 methods in my viewmodel somehow? For the selecteditemchanged of the listbox i think there must also be a 'return call' possible when the viewmodel tries to set the selecteditem to another value? i come from a asp.net (mvc) background, but can't figure out how to do it in silverlight.

    Read the article

  • Append a .css file to an iframe so styles can be overrided

    - by Toni Michel Caubet
    i am trying like this: $(document).ready(function(){ $('#muestraMotor').bind('mousedown',function(){ var cssLink = document.createElement("link"); cssLink.href = "../estilo/css/datepicker.css"; cssLink .rel = "stylesheet"; cssLink .type = "text/css"; frames['cboxIframe'].document.body.appendChild(cssLink); }); }) where cboxIframe is the id of the iframe, Firebug jumps: frames.cboxIframe is undefined [Detener en este error] frames['cboxIframe'].document.body.appendChild(cssLink);

    Read the article

  • Recursively add files by pattern

    - by Michel Krämer
    How do I recursively add files by a pattern (or glob) located in different directories? For example, I'd like to add A/B/C/foo.java and D/E/F/bar.java (and several other java files) with one command: git add '*.java' Unfortunately, that doesn't work as expected.

    Read the article

  • what is middleware exactly?

    - by michel
    I hear a lot of people talking last days about middleware, but what is the exact definition of middleware. If I look in information about middleware I found a lot of information and some definitions, but while reading this information and defintions it seems that mostly all 'wares' are in the middle of something. So from my opinion all things are middleware? or do you have an example of a ware that doesn't is middleware?

    Read the article

  • How does asp.net MVC remember my incorrect values on postback?

    - by Michel
    This is working, but how??? I have a controller action for a post: [AcceptVerbs(HttpVerbs.Post )] public ActionResult Edit(Person person) { bool isvalid = ModelState.IsValid; etc. The Person object has a property BirthDate, type DateTime. When i enter some invalid data in the form, say 'blabla' which is obvious not a valid Datetime, it fills all the (other) Person properties with the correct data and the BirthDate property with a new blank DateTime. The bool isvalid has the value 'false'. So far so good. Then i do this: return View(p); and in the view i have this: <%= Html.TextBox("BirthDate", String.Format("{0:g}", Model.BirthDate)) %> <%= Html.ValidationMessage("BirthDate", "*") %> Ant there it comes: i EXPECTED the model to contain the new, blank DateTime because i didn't put any new data in. Second, when the View displays something, it must be a DateTime, because Model.BirthDate can't hold anything but a DateTime. But to my surprise, it shows a textbox with the 'blabla' value! (and the red * behind it) Which ofcourse is nice because the user can seee what he typed wrong, but how can that (blabla)string be transferred to the View in a DateTime field?

    Read the article

  • Can't resolve CalledFromWrongThreadException with Handler

    - by michel
    I will try to keep it simple: In my main activity I make a handler: public class ARViewer extends ARDisplayActivity { public final MHandler mHandler = new MHandler(this); public void onCreate(Bundle savedInstanceState) { ... The class MHandler: public final class MHandler extends Handler{ //main activity private ARViewer arnv; public MHandler(ARViewer arnv){ this.arnv = arnv; } @Override public void handleMessage(Message msg) { ... case H_RR : arnv.setContentView(R.layout.routeplanner); break; ... super.handleMessage(msg); } } But if I call the handleMessage method from a callback function in a other Class, definitely from a other thread, I still get the exception message: CalledFromWrongThreadException (Only the original thread that created a view hierarchy can touch its views) : public void rFound(Route route) { Message msg = new Message(); msg.what = MHandler.H_RR; ARViewer.arnv.mHandler.handleMessage(msg); }

    Read the article

  • asp.net MVC: how to catch a 404 error?

    - by Michel
    Hi, in the old days, with asp.net, when i would navigate to a non existing page, the .net framework (or iis?) would throw a 404 and i could attach a default page to that error in the web.config in the custom errors section. but in the asp.net mvc that doesn't seem to work? Does the mvc framework throws some kind of invalid route excpetion saying it can't find any route for my uri or something like that?

    Read the article

  • What is the way to go to fake my database layer in a unit test?

    - by Michel
    Hi, i have a question about unit testing. say i have a controller with one create method which puts a new customer in the database: //code a bit shortened public actionresult Create(Formcollection formcollection){ client c = nwe client(); c.Name = formcollection["name"]; ClientService.Save(c); { Clientservice would call a datalayer object and save it in the database. What i do now is create a database testscript and set my database in a know condition before testing. So when i test this method in the unit test, i know that there must be one more client in the database, and what it's name is. In short: ClientController cc = new ClientController(); cc.Create(new FormCollection (){name="John"}); //i know i had 10 clients before assert.areEqual(11, ClientService.GetNumberOfClients()); //the last inserted one is John assert.areEqual("John", ClientService.GetAllClients()[10].Name); So i've read that unit testing should not be hitting the database, i've setup an IOC for the database classes, but then what? I can create a fake database class, and make it do nothing. But then ofcourse my assertions will not work because if i say GetNumberOfClients() it will alwasy return X because it has no interaction with the fake database class used in the Create Method. I can also create a List of Clients in the fake database class, but as there will be two different instance created (one in the controller action and one in the unit test), they will have no interaction. What is the way to make this unit test work without a database?

    Read the article

  • How do I fix a font compatibilty issue from Mac to Windows, using Adobe Flash CS4?

    - by Michel Carroll
    Hi, I need to edit a Flash movie that somebody else developed in Adobe Flash CS3 on a Mac. I'm using Adobe Flash CS4 on Windows (Vista). However, the font that shows up on my computer is much bigger than on the .SWF that he produced. He used a custom font, which I had to add to my system Fonts folder. Because Adobe Flash detected the right fonts on my computer, it didn't map them to substitute fonts. I verified that Flash is indeed using the same font files that he used. I believe the fonts are being rendered differently because I'm using Windows. How do I fix this?

    Read the article

  • ScrollViewer GridView XAML

    - by Michel Bakker
    I am currently building a Windows 8 XAML C# application. In a page I have a scrollviewer for horizontal swiping and scrolling. I have several controls in it which work really well with the scorllviewer. But when you scroll and your cursor is on top of the ListView / GridView, then that control will handle scrollnig instead of the scrollviewer. With swiping this doesn't happen, but with the mouse scrollwheel it stops the scrollvieweing scroll. Does anybody know how to disable this behavior or have a workaround?

    Read the article

  • C# delegate or Func for 'all methods'?

    - by Michel
    Hi, i've read something about Func's and delegates and that they can help you to pass a method as a parameter. Now i have a cachingservice, and it has this declaration: public static void AddToCache<T>(T model, double millisecs, string cacheId) where T : class public static T GetFromCache<T>(string cacheId) where T : class So in a place where i want to cache some data, i check if it exists in the cache (with GetFromCache) and if not, get the data from somewhere, and the add it to the cache (with AddToCache) Now i want to extend the AddToCache method with a parameter, which is the class+method to call to get the data Then the declaration would be like this public static void AddToCache<T>(T model, double millisecs, string cacheId, Func/Delegate methode) where T : class Then this method could check wether the cache has data or not, and if not, get the data itself via the method it got provided. Then in the calling code i could say: AddToCache<Person>(p, 10000, "Person", new PersonService().GetPersonById(1)); AddToCache<Advert>(a, 100000, "Advert", new AdvertService().GetAdverts(3)); What i want to achieve is that the 'if cache is empty get data and add to cache' logic is placed on only one place. I hope this makes sense :) Oh, by the way, the question is: is this possible?

    Read the article

  • Custom Geo Tagging. Name to position and position to name

    - by Toni Michel Caubet
    Hello there i am implementing a custom geo tagging system, ok Array where i store the cordenades of each place /* ******Opciones del etiquetado del mapa*** */ var TagSpeed = 800; //el tiempo de la animacion var animate = true; //false = fadeIn / true = animate var paises = { "isora": { leftX: '275', topY: '60', name: 'Gran Melia Palacio de Isora' }, "pepe": { leftX: '275', topY: '60', name: 'Gran Melia de Don Pepe' }, "australia": { leftX: '565', topY: '220', name: 'Gran Melia Uluru' }, "otro": { // ejemplo leftX: '565', // cordenada x topY: '220', // cordenada y name: 'soy otro' // nombre a mostrar } /* <==> <span class="otro mPointer">isora</span> */ } /**/ this is how i check with js function escucharMapa(){ /*fOpciones*/ $('.mPointer').bind('mouseover',function(){ var clase = $(this).attr('class').replace(" mPointer", ""); var left_ = paises[clase].leftX; var top_ = paises[clase].topY; var name_ = paises[clase].name; $('.arrow .text').html(name_); /*Esta linea centra la etiqueta del hotel con la flecha. Si cambia el tamaño de fuente o la typo, habrá que cambiar el 3.3*/ $('.arrow .text').css({'marginLeft':'-'+$('.arrow .text').html().length*3.3+'px'}); $('.arrow').css({top:'-60px',left:left_+'px'}); if(animate) $('.arrow').show().stop().animate({'top':top_},TagSpeed,'easeInOutBack'); else $('.arrow').css({'top':top_+'px'}).fadeIn(500); }); $('.mPointer').bind('mouseleave',function(){ if(animate) $('.arrow').stop().animate({'top':'0px'},100,function(){ $('.arrow').hide() }); else $('.arrow').hide(); }); } /*Inicio gestion geoEtiquetado*/ $(document).ready(function(){ escucharMapa(); }); HTML <div style="float:left;height:500px;"> <div class="map"> <div class="arrow"> <div class="text"></div> <img src="img/flecha.png"/> </div> <!--mapa--> <img src="http://www.freepik.es/foto-gratis/mapa-del-mundo_17-903095345.jpg" id="img1"/> <br/> <br/> <span class="isora mPointer">isora</span> <span class="pepe mPointer">Pepe</span> <span class="australia mPointer">Australia</span> </div> </div> OK so you have vew items and when you hover one, it gets the classname, it checks the cordinades in the object and displays a cursor in those cordinades of the image, right? ok so how can i do the opposite? lets say if user hovers +-30px error margin (top and left) an area in the map the item is highlighted??? i was considering -on map image mouse over - get the offset of the mouse - if is in the margin error area -show else -no show But that does not look really efficient as long as it would have to caculate each pixel movement, no?

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >