Search Results

Search found 78 results on 4 pages for 'jc'.

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

  • Python 2.7.3 memory error

    - by Tom Baker
    I have a specific case with python code. Every time I run the code, the RAM memory is increasing until it reaches 1.8 gb and crashes. import itertools import csv import pokersleuth cards = ['2s', '3s', '4s', '5s', '6s', '7s', '8s', '9s', 'Ts', 'Js', 'Qs', 'Ks', 'As', '2h', '3h', '4h', '5h', '6h', '7h', '8h', '9h', 'Th', 'Jh', 'Qh', 'Kh', 'Ah', '2c', '3c', '4c', '5c', '6c', '7c', '8c', '9c', 'Tc', 'Jc', 'Qc', 'Kc', 'Ac', '2d', '3d', '4d', '5d', '6d', '7d', '8d', '9d', 'Td', 'Jd', 'Qd', 'Kd', 'Ad'] flop = itertools.combinations(cards,3) a1 = 'Ks' ; a2 = 'Qs' b1 = 'Jc' ; b2 = 'Jd' cards1 = a1+a2 cards2 = b1+b2 number = 0 n=0 m=0 for row1 in flop: if (row1[0] <> a1 and row1[0] <>a2 and row1[0] <>b1 and row1[0] <>b2) and (row1[1] <> a1 and row1[1] <>a2 and row1[1] <>b1 and row1[1] <>b2) and (row1[2] <> a1 and row1[2] <> a2 and row1[2] <> b1 and row1[2] <> b2): for row2 in cards: if (row2 <> a1 and row2 <> a2 and row2 <> b1 and row2 <> b2 and row2 <> row1[0] and row2 <> row1[1] and row2 <> row1[2]): s = pokersleuth.compute_equity(row1[0]+row1[1]+row1[2]+row2, (cards1, cards2)) if s[0]>=0.5: number +=1 del s[:] del s[:] print number/45.0 number = 0 n+=1

    Read the article

  • Running psexec against Window 7?

    - by Jimmy C
    I can't seem to get psexec commands to work on Windows 7 Enterprise. I'm trying to execute a command like this: psexec.exe \\172.16.165.157 -u jc -p testing123 -c -f -i cmd.exe But, I keep getting the error: PsExec v1.94 - Execute processes remotely Copyright (C) 2001-2008 Mark Russinovich Sysinternals - www.sysinternals.com Error copying C:\WINDOWS\system32\cmd.exe to remote system: Access is denied. I'm trying to execute the command from a machine running Windows XP Professional. Has anybody seen an issue like this?

    Read the article

  • How to install a downloaded Ruby gem file ?

    - by JCLL
    How does "gem install" works ? It is not intuitive... My gem is really here : [root@localhost Téléchargement]# ll *.gem -rw-rw-r-- 1 jean jean 16353818 mar 5 11:39 ruby-processing-1.0.9.gem But an idiomatic "gem install" does not see it... [root@localhost Téléchargement]# gem install ruby-processing-1.0.9.gem ERROR: could not find gem ruby-processing-1.0.9.gem locally or in a repository What's wrong with that ? Thx JC

    Read the article

  • Validating against a Schema with JAXB

    - by fwgx
    I've been looking for solutions to this problem for far too long considering how easy it sounds so I've come for some help. I have an XML Schema which I have used with xjc to create my JAXB binding. This works fine when the XML is well formed. Unfortunately it also doesn't complain when the XML is not well formed. I cannot figure out how to do proper full validation against the schema when I try to unmarshall an XML file. I have managed to use a ValidationEventCollector to handle events, which works for XML parsing errors such as mismatched tags but doesn't raise any events when there is a tag that is required but is completely absent. From what I have seen validation can be done againsta schema, but you must know the path to the schema in order to pass it into the setSchema() method. The problem I have is that the path to the schema is stored in the XML header and I can't knwo at run time where the schema is going to be. Which is why it's stored in the XML file: <?xml version="1.0" encoding="utf-8"?> <DDSSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/a/big/long/path/to/a/schema/file/DDSSettings.xsd"> <Field1>1</Field1> <Field2>-1</Field2> ...etc Every example I see uses setValidating(true), which is now deprecated, so throws an exception. This is the Java code I have so far, which seems to only do XML validation, not schema validation: try { JAXBContext jc = new JAXBContext() { private final JAXBContext jaxbContext = JAXBContext.newInstance("blah"); @Override public Unmarshaller createUnmarshaller() throws JAXBException { Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); ValidationEventCollector vec = new ValidationEventCollector() { @Override public boolean handleEvent(ValidationEvent event) throws RuntimeException { ValidationEventLocator vel = event.getLocator(); if (event.getSeverity() == event.ERROR || event.getSeverity() == event.FATAL_ERROR) { String error = "XML Validation Exception: " + event.getMessage() + " at row: " + vel.getLineNumber() + " column: " + vel.getColumnNumber(); System.out.println(error); } m_unmarshallingOk = false; return false; } }; unmarshaller.setEventHandler(vec); return unmarshaller; } @Override public Marshaller createMarshaller() throws JAXBException { throw new UnsupportedOperationException("Not supported yet."); } @Override @SuppressWarnings("deprecation") public Validator createValidator() throws JAXBException { throw new UnsupportedOperationException("Not supported yet."); } }; Unmarshaller unmarshaller = jc.createUnmarshaller(); m_ddsSettings = (com.ultra.DDSSettings)unmarshaller.unmarshal(new File(xmlfileName)); } catch (UnmarshalException ex) { Logger.getLogger(UniversalDomainParticipant.class.getName()).log( Level.SEVERE, null, ex); } catch (JAXBException ex) { Logger.getLogger(UniversalDomainParticipant.class.getName()).log( Level.SEVERE, null, ex); } So what is the proper way to do this validation? I was expecting there to be a validate() method on the JAXB generated classes, but I guess that would be too simple for Java.

    Read the article

  • matlab and gplot

    - by JPC
    Hi, Im trying to find a way to plot a truss in matlab, i can do it by using an adjacancy matrix and the gplot function, but its very long winded approach especially if there are a lot of nodes connected to one another. Is there a faster way to do this? I'm new to matlab and the programming world any help would be really appreciated. JC

    Read the article

  • Extending Oracle CEP with Predictive Analytics

    - by vikram.shukla(at)oracle.com
    Introduction: OCEP is often used as a business rules engine to execute a set of business logic rules via CQL statements, and take decisions based on the outcome of those rules. There are times where configuring rules manually is sufficient because an application needs to deal with only a small and well-defined set of static rules. However, in many situations customers don't want to pre-define such rules for two reasons. First, they are dealing with events with lots of columns and manually crafting such rules for each column or a set of columns and combinations thereof is almost impossible. Second, they are content with probabilistic outcomes and do not care about 100% precision. The former is the case when a user is dealing with data with high dimensionality, the latter when an application can live with "false" positives as they can be discarded after further inspection, say by a Human Task component in a Business Process Management software. The primary goal of this blog post is to show how this can be achieved by combining OCEP with Oracle Data Mining® and leveraging the latter's rich set of algorithms and functionality to do predictive analytics in real time on streaming events. The secondary goal of this post is also to show how OCEP can be extended to invoke any arbitrary external computation in an RDBMS from within CEP. The extensible facility is known as the JDBC cartridge. The rest of the post describes the steps required to achieve this: We use the dataset available at http://blogs.oracle.com/datamining/2010/01/fraud_and_anomaly_detection_made_simple.html to showcase the capabilities. We use it to show how transaction anomalies or fraud can be detected. Building the model: Follow the self-explanatory steps described at the above URL to build the model.  It is very simple - it uses built-in Oracle Data Mining PL/SQL packages to cleanse, normalize and build the model out of the dataset.  You can also use graphical Oracle Data Miner®  to build the models. To summarize, it involves: Specifying which algorithms to use. In this case we use Support Vector Machines as we're trying to find anomalies in highly dimensional dataset.Build model on the data in the table for the algorithms specified. For this example, the table was populated in the scott/tiger schema with appropriate privileges. Configuring the Data Source: This is the first step in building CEP application using such an integration.  Our datasource looks as follows in the server config file.  It is advisable that you use the Visualizer to add it to the running server dynamically, rather than manually edit the file.    <data-source>         <name>DataMining</name>         <data-source-params>             <jndi-names>                 <element>DataMining</element>             </jndi-names>             <global-transactions-protocol>OnePhaseCommit</global-transactions-protocol>         </data-source-params>         <connection-pool-params>             <credential-mapping-enabled></credential-mapping-enabled>             <test-table-name>SQL SELECT 1 from DUAL</test-table-name>             <initial-capacity>1</initial-capacity>             <max-capacity>15</max-capacity>             <capacity-increment>1</capacity-increment>         </connection-pool-params>         <driver-params>             <use-xa-data-source-interface>true</use-xa-data-source-interface>             <driver-name>oracle.jdbc.OracleDriver</driver-name>             <url>jdbc:oracle:thin:@localhost:1522:orcl</url>             <properties>                 <element>                     <value>scott</value>                     <name>user</name>                 </element>                 <element>                     <value>{Salted-3DES}AzFE5dDbO2g=</value>                     <name>password</name>                 </element>                                 <element>                     <name>com.bea.core.datasource.serviceName</name>                     <value>oracle11.2g</value>                 </element>                 <element>                     <name>com.bea.core.datasource.serviceVersion</name>                     <value>11.2.0</value>                 </element>                 <element>                     <name>com.bea.core.datasource.serviceObjectClass</name>                     <value>java.sql.Driver</value>                 </element>             </properties>         </driver-params>     </data-source>   Designing the EPN: The EPN is very simple in this example. We briefly describe each of the components. The adapter ("DataMiningAdapter") reads data from a .csv file and sends it to the CQL processor downstream. The event payload here is same as that of the table in the database (refer to the attached project or do a "desc table-name" from a SQL*PLUS prompt). While this is for convenience in this example, it need not be the case. One can still omit fields in the streaming events, and need not match all columns in the table on which the model was built. Better yet, it does not even need to have the same name as columns in the table, as long as you alias them in the USING clause of the mining function. (Caveat: they still need to draw values from a similar universe or domain, otherwise it constitutes incorrect usage of the model). There are two things in the CQL processor ("DataMiningProc") that make scoring possible on streaming events. 1.      User defined cartridge function Please refer to the OCEP CQL reference manual to find more details about how to define such functions. We include the function below in its entirety for illustration. <?xml version="1.0" encoding="UTF-8"?> <jdbcctxconfig:config     xmlns:jdbcctxconfig="http://www.bea.com/ns/wlevs/config/application"     xmlns:jc="http://www.oracle.com/ns/ocep/config/jdbc">        <jc:jdbc-ctx>         <name>Oracle11gR2</name>         <data-source>DataMining</data-source>               <function name="prediction2">                                 <param name="CQLMONTH" type="char"/>                      <param name="WEEKOFMONTH" type="int"/>                      <param name="DAYOFWEEK" type="char" />                      <param name="MAKE" type="char" />                      <param name="ACCIDENTAREA"   type="char" />                      <param name="DAYOFWEEKCLAIMED"  type="char" />                      <param name="MONTHCLAIMED" type="char" />                      <param name="WEEKOFMONTHCLAIMED" type="int" />                      <param name="SEX" type="char" />                      <param name="MARITALSTATUS"   type="char" />                      <param name="AGE" type="int" />                      <param name="FAULT" type="char" />                      <param name="POLICYTYPE"   type="char" />                      <param name="VEHICLECATEGORY"  type="char" />                      <param name="VEHICLEPRICE" type="char" />                      <param name="FRAUDFOUND" type="int" />                      <param name="POLICYNUMBER" type="int" />                      <param name="REPNUMBER" type="int" />                      <param name="DEDUCTIBLE"   type="int" />                      <param name="DRIVERRATING"  type="int" />                      <param name="DAYSPOLICYACCIDENT"   type="char" />                      <param name="DAYSPOLICYCLAIM" type="char" />                      <param name="PASTNUMOFCLAIMS" type="char" />                      <param name="AGEOFVEHICLES" type="char" />                      <param name="AGEOFPOLICYHOLDER" type="char" />                      <param name="POLICEREPORTFILED" type="char" />                      <param name="WITNESSPRESNT" type="char" />                      <param name="AGENTTYPE" type="char" />                      <param name="NUMOFSUPP" type="char" />                      <param name="ADDRCHGCLAIM"   type="char" />                      <param name="NUMOFCARS" type="char" />                      <param name="CQLYEAR" type="int" />                      <param name="BASEPOLICY" type="char" />                                     <return-component-type>char</return-component-type>                                                      <sql><![CDATA[             SELECT to_char(PREDICTION_PROBABILITY(CLAIMSMODEL, '0' USING *))               AS probability             FROM (SELECT  :CQLMONTH AS MONTH,                                            :WEEKOFMONTH AS WEEKOFMONTH,                          :DAYOFWEEK AS DAYOFWEEK,                           :MAKE AS MAKE,                           :ACCIDENTAREA AS ACCIDENTAREA,                           :DAYOFWEEKCLAIMED AS DAYOFWEEKCLAIMED,                           :MONTHCLAIMED AS MONTHCLAIMED,                           :WEEKOFMONTHCLAIMED,                             :SEX AS SEX,                           :MARITALSTATUS AS MARITALSTATUS,                            :AGE AS AGE,                           :FAULT AS FAULT,                           :POLICYTYPE AS POLICYTYPE,                            :VEHICLECATEGORY AS VEHICLECATEGORY,                           :VEHICLEPRICE AS VEHICLEPRICE,                           :FRAUDFOUND AS FRAUDFOUND,                           :POLICYNUMBER AS POLICYNUMBER,                           :REPNUMBER AS REPNUMBER,                           :DEDUCTIBLE AS DEDUCTIBLE,                            :DRIVERRATING AS DRIVERRATING,                           :DAYSPOLICYACCIDENT AS DAYSPOLICYACCIDENT,                            :DAYSPOLICYCLAIM AS DAYSPOLICYCLAIM,                           :PASTNUMOFCLAIMS AS PASTNUMOFCLAIMS,                           :AGEOFVEHICLES AS AGEOFVEHICLES,                           :AGEOFPOLICYHOLDER AS AGEOFPOLICYHOLDER,                           :POLICEREPORTFILED AS POLICEREPORTFILED,                           :WITNESSPRESNT AS WITNESSPRESENT,                           :AGENTTYPE AS AGENTTYPE,                           :NUMOFSUPP AS NUMOFSUPP,                           :ADDRCHGCLAIM AS ADDRCHGCLAIM,                            :NUMOFCARS AS NUMOFCARS,                           :CQLYEAR AS YEAR,                           :BASEPOLICY AS BASEPOLICY                 FROM dual)                 ]]>         </sql>        </function>     </jc:jdbc-ctx> </jdbcctxconfig:config> 2.      Invoking the function for each event. Once this function is defined, you can invoke it from CQL as follows: <?xml version="1.0" encoding="UTF-8"?> <wlevs:config xmlns:wlevs="http://www.bea.com/ns/wlevs/config/application">   <processor>     <name>DataMiningProc</name>     <rules>        <query id="q1"><![CDATA[                     ISTREAM(SELECT S.CQLMONTH,                                   S.WEEKOFMONTH,                                   S.DAYOFWEEK, S.MAKE,                                   :                                         S.BASEPOLICY,                                    C.F AS probability                                                 FROM                                 StreamDataChannel [NOW] AS S,                                 TABLE(prediction2@Oracle11gR2(S.CQLMONTH,                                      S.WEEKOFMONTH,                                      S.DAYOFWEEK,                                       S.MAKE, ...,                                      S.BASEPOLICY) AS F of char) AS C)                       ]]></query>                 </rules>               </processor>           </wlevs:config>   Finally, the last stage in the EPN prints out the probability of the event being an anomaly. One can also define a threshold in CQL to filter out events that are normal, i.e., below a certain mark as defined by the analyst or designer. Sample Runs: Now let's see how this behaves when events are streamed through CEP. We use only two events for brevity, one normal and other one not. This is one of the "normal" looking events and the probability of it being anomalous is less than 60%. Event is: eventType=DataMiningOutEvent object=q1  time=2904821976256 S.CQLMONTH=Dec, S.WEEKOFMONTH=5, S.DAYOFWEEK=Wednesday, S.MAKE=Honda, S.ACCIDENTAREA=Urban, S.DAYOFWEEKCLAIMED=Tuesday, S.MONTHCLAIMED=Jan, S.WEEKOFMONTHCLAIMED=1, S.SEX=Female, S.MARITALSTATUS=Single, S.AGE=21, S.FAULT=Policy Holder, S.POLICYTYPE=Sport - Liability, S.VEHICLECATEGORY=Sport, S.VEHICLEPRICE=more than 69000, S.FRAUDFOUND=0, S.POLICYNUMBER=1, S.REPNUMBER=12, S.DEDUCTIBLE=300, S.DRIVERRATING=1, S.DAYSPOLICYACCIDENT=more than 30, S.DAYSPOLICYCLAIM=more than 30, S.PASTNUMOFCLAIMS=none, S.AGEOFVEHICLES=3 years, S.AGEOFPOLICYHOLDER=26 to 30, S.POLICEREPORTFILED=No, S.WITNESSPRESENT=No, S.AGENTTYPE=External, S.NUMOFSUPP=none, S.ADDRCHGCLAIM=1 year, S.NUMOFCARS=3 to 4, S.CQLYEAR=1994, S.BASEPOLICY=Liability, probability=.58931702982118561 isTotalOrderGuarantee=true\nAnamoly probability: .58931702982118561 However, the following event is scored as an anomaly with a very high probability of  89%. So there is likely to be something wrong with it. A close look reveals that the value of "deductible" field (10000) is not "normal". What exactly constitutes normal here?. If you run the query on the database to find ALL distinct values for the "deductible" field, it returns the following set: {300, 400, 500, 700} Event is: eventType=DataMiningOutEvent object=q1  time=2598483773496 S.CQLMONTH=Dec, S.WEEKOFMONTH=5, S.DAYOFWEEK=Wednesday, S.MAKE=Honda, S.ACCIDENTAREA=Urban, S.DAYOFWEEKCLAIMED=Tuesday, S.MONTHCLAIMED=Jan, S.WEEKOFMONTHCLAIMED=1, S.SEX=Female, S.MARITALSTATUS=Single, S.AGE=21, S.FAULT=Policy Holder, S.POLICYTYPE=Sport - Liability, S.VEHICLECATEGORY=Sport, S.VEHICLEPRICE=more than 69000, S.FRAUDFOUND=0, S.POLICYNUMBER=1, S.REPNUMBER=12, S.DEDUCTIBLE=10000, S.DRIVERRATING=1, S.DAYSPOLICYACCIDENT=more than 30, S.DAYSPOLICYCLAIM=more than 30, S.PASTNUMOFCLAIMS=none, S.AGEOFVEHICLES=3 years, S.AGEOFPOLICYHOLDER=26 to 30, S.POLICEREPORTFILED=No, S.WITNESSPRESENT=No, S.AGENTTYPE=External, S.NUMOFSUPP=none, S.ADDRCHGCLAIM=1 year, S.NUMOFCARS=3 to 4, S.CQLYEAR=1994, S.BASEPOLICY=Liability, probability=.89171554529576691 isTotalOrderGuarantee=true\nAnamoly probability: .89171554529576691 Conclusion: By way of this example, we show: real-time scoring of events as they flow through CEP leveraging Oracle Data Mining.how CEP applications can invoke complex arbitrary external computations (function shipping) in an RDBMS.

    Read the article

  • Send mail from a distrobution groups email address

    - by Campo
    A user has send permission on a distro group on a WINDOWS SERVER 2003 domain. I am the admin. When either of us send email using the distrobution groups email adress we get a non delivery report Your message did not reach some or all of the intended recipients. Subject: TEST Sent: 4/19/2010 4:46 PM The following recipient(s) cannot be reached: [email protected] on 4/19/2010 4:46 PM You do not have permission to send to this recipient. For assistance, contact your system administrator. MSEXCH:MSExchangeIS:/DC=local/DC=DOMAIN:SERVERNAME Thanks, JC

    Read the article

  • Error Loading Simple XML

    - by Rooneyl
    I have an xml document (generated from msword 2010), which I am trying to process using simple xml. Sample of xml: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" mc:Ignorable="w14 wp14"> <w:body> <w:p w:rsidR="005B1098" w:rsidRDefault="005B1098"/> <w:p w:rsidR="00F254A4" w:rsidRDefault="00F254A4"/> <w:p w:rsidR="00F254A4" w:rsidRPr="008475A1" w:rsidRDefault="00C15492" w:rsidP="008475A1"> <w:pPr> <w:jc w:val="center"/> <w:rPr> <w:b/> <w:sz w:val="44"/> <w:szCs w:val="44"/> </w:rPr> </w:pPr> <w:r w:rsidRPr="008475A1"> <w:rPr> <w:b/> <w:sz w:val="44"/> <w:szCs w:val="44"/> </w:rPr> <w:t>Test file</w:t> </w:r> </w:p> <w:p w:rsidR="00C15492" w:rsidRPr="008475A1" w:rsidRDefault="00C15492" w:rsidP="008475A1"> <w:pPr> <w:jc w:val="center"/> <w:rPr> <w:sz w:val="20"/> <w:szCs w:val="20"/> </w:rPr> </w:pPr> <w:r w:rsidRPr="008475A1"> <w:rPr> <w:sz w:val="20"/> <w:szCs w:val="20"/> </w:rPr> <w:t>another paragraph</w:t> </w:r> </w:p> </w:body> </w:document> I am trying to open it using: if(!$simple_xml = simplexml_load_file($content)){ trigger_error('Error reading XML file',E_USER_ERROR); } else { echo 'loaded'; } And get the error: Message: simplexml_load_file(): I/O warning : failed to load external entity " Test file another paragraph " Any ideas?

    Read the article

  • Send mail from a distrobution groups email adress

    - by Campo
    A user has send permission on a distro group on a WINDOWS SERVER 2003 domain. I am the admin. When either of us send email using the distrobution groups email adress we get a non delivery report Your message did not reach some or all of the intended recipients. Subject: TEST Sent: 4/19/2010 4:46 PM The following recipient(s) cannot be reached: [email protected] on 4/19/2010 4:46 PM You do not have permission to send to this recipient. For assistance, contact your system administrator. MSEXCH:MSExchangeIS:/DC=local/DC=DOMAIN:SERVERNAME Thanks, JC

    Read the article

  • Send mail from a distribution group's email address

    - by Campo
    A user has send permission on a distro group on a WINDOWS SERVER 2003 domain. I am the admin. When either of us sends email using the distribution group's email adress we get a non delivery report Your message did not reach some or all of the intended recipients. Subject: TEST Sent: 4/19/2010 4:46 PM The following recipient(s) cannot be reached: [email protected] on 4/19/2010 4:46 PM You do not have permission to send to this recipient. For assistance, contact your system administrator. MSEXCH:MSExchangeIS:/DC=local/DC=DOMAIN:SERVERNAME Thanks, JC

    Read the article

  • Jaxb unmarshalls fixml object but all fields are null

    - by DUFF
    I have a small XML document in the FIXML format. I'm unmarshalling them using jaxb. The problem The process complete without errors but the objects which are created are completely null. Every field is empty. The fields which are lists (like the Qty) have the right number of object in them. But the fields of those objects are also null. Setup I've downloaded the FIXML schema from here and I've created the classes with xjc and the maven plugin. They are all in the package org.fixprotocol.fixml_5_0_sp2. I've got the sample xml in a file FIXML.XML <?xml version="1.0" encoding="ISO-8859-1"?> <FIXML> <Batch> <PosRpt> <Pty ID="GS" R="22"/> <Pty ID="01" R="5"/> <Pty ID="6U8" R="28"> <Sub ID="2" Typ="21"/> </Pty> <Pty ID="GS" R="22"/> <Pty ID="6U2" R="2"/> <Instrmt ID="GHPKRW" SecTyp="FWD" MMY="20121018" MatDt="2012-10-18" Mult="1" Exch="GS" PxQteCcy="KJS" FnlSettlCcy="GBP" Fctr="0.192233298" SettlMeth="G" ValMeth="FWDC2" UOM="Ccy" UOMCCy="USD"> <Evnt EventTyp="121" Dt="2013-10-17"/> <Evnt EventTyp="13" Dt="2013-10-17"/> </Instrmt> <Qty Long="0.000" Short="22000000.000" Typ="PNTN"/> <Qty Long="0.000" Short="22000000.000" Typ="FIN"/> <Qty Typ="DLV" Long="0.00" Short="0.00" Net="0.0"/> <Amt Typ="FMTM" Amt="32.332" Ccy="USD"/> <Amt Typ="CASH" Amt="1" Rsn="3" Ccy="USD"/> <Amt Typ="IMTM" Amt="329.19" Ccy="USD"/> <Amt Typ="DLV" Amt="0.00" Ccy="USD"/> <Amt Typ="BANK" Amt="432.23" Ccy="USD"/> </PosRpt> Then I'm calling the unmarshaller with custom event handler which just throws an exception on a parse error. The parsing complete so I know there are no errors being generated. I'm also handling the namespace as suggested here // sort out the file String xmlFile = "C:\\FIXML.XML.xml"; System.out.println("Loading XML File..." + xmlFile); InputStream input = new FileInputStream(xmlFile); InputSource is = new InputSource(input); // create jaxb context JAXBContext jc = JAXBContext.newInstance("org.fixprotocol.fixml_5_0_sp2"); Unmarshaller unmarshaller = jc.createUnmarshaller(); // add event handler so jacB will fail on an error CustomEventHandler validationEventHandler = new CustomEventHandler(); unmarshaller.setEventHandler(validationEventHandler); // set the namespace NamespaceFilter inFilter = new NamespaceFilter("http://www.fixprotocol.org/FIXML-5-0-SP2", true); inFilter.setParent(SAXParserFactory.newInstance().newSAXParser().getXMLReader()); SAXSource source = new SAXSource(inFilter, is); // GO! JAXBElement<FIXML> fixml = unmarshaller.unmarshal(source, FIXML.class); The fixml object is created. In the above sample the Amt array will have five element which matches the number of amts in the file. But all the fields like ccy are null. I've put breakpoints in the classes created by xjc and none of the setters are ever called. So it appears that jaxb is unmarshalling and creating all the correct objects, but it's never calling the setters?? I'm completely stumped on this. I've seen a few posts that suggrest making sure the package.info file that was generated by xjc is in the packags and I've made sure that it's there. There are no working in the IDE about the generated code. Any help much appreciated.

    Read the article

  • Help in building an 16 bit os

    - by Barshan Das
    I am trying to build an old 16 bit dos like os. My bootloader code: ; This is not my code. May be of Fritzos. I forgot the source. ORG 7c00h jmp Start drive db 0 msg db " Loader Initialization",0 msg2 db "ACos Loaded",0 print: lodsb cmp al, 0 je end mov ah, 0Eh int 10h jmp print end: ret Start: mov [ drive ], dl ; Get the floppy OS booted from ; Update the segment registers xor ax, ax ; XOR ax mov ds, ax ; Mov AX into DS mov si,msg call print ; Load Kernel. ResetFloppy: mov ax, 0x00 ; Select Floppy Reset BIOS Function mov dl, [ drive ] ; Select the floppy ADos booted from int 13h ; Reset the floppy drive jc ResetFloppy ; If there was a error, try again. ReadFloppy: mov bx, 0x9000 ; Load kernel at 9000h. mov ah, 0x02 ; Load disk data to ES:BX mov al, 17 ; Load two floppy head full's worth of data. mov ch, 0 ; First Cylinder mov cl, 2 ; Start at the 2nd Sector to load the Kernel mov dh, 0 ; Use first floppy head mov dl, [ drive ] ; Load from the drive kernel booted from. int 13h ; Read the floppy disk. jc ReadFloppy ; Error, try again. ; Clear text mode screen mov ax, 3 int 10h ;print starting message mov si,msg2 call print mov ax, 0x0 mov ss, ax mov sp, 0xFFFF jmp 9000h ; This part makes sure the bootsector is 512 bytes. times 510-($-$$) db 0 ;bootable sector signature dw 0xAA55 My example kernel code: asm(".code16\n"); void putchar(char); int main() { putchar('A'); return 0; } void putchar(char val) { asm("movb %0, %%al\n" "movb $0x0E, %%ah\n" "int $0x10\n" : :"r"(val) ) ; } This is how I compile it : nasm -f bin -o ./bin/boot.bin ./source/boot.asm gcc -nostdinc -fno-builtin -I./include -c -o ./bin/kernel.o ./source/kernel.c ld -Ttext=0x9000 -o ./bin/kernel.bin ./bin/kernel.o -e 0x0 dd if=/dev/zero of=./bin/empty.bin bs=1440K count=1 cat ./bin/boot.bin ./bin/kernel.bin ./bin/empty.bin|head -c 1440K > ./bin/os rm ./bin/empty.bin and I run it in virtual machine. When I make the putchar function ( in kernel code ) for constant value ....i.e like this: void putchar() { char val = 'A'; asm("movb %0, %%al\n" "movb $0x0E, %%ah\n" "int $0x10\n" : :"r"(val) ) ; } then it works fine. But when I pass argument to it ( That is in the previous code ) , then it prints a space for any character. What should I do?

    Read the article

  • Learning C, C++ and C#

    - by Zac
    I'm sure you guys are tired of this question but after wading through hours of similar posts and questions I've really not made any progress to my specific concerns. I was hoping you guys could shed some light on a couple of questions I have before I decide on a course of action. BACKGROUND: I'm wanting to enroll in some type of program to learn a programming language/get a certificate/degree to work in the field. I've always been interested and bought a book on VB back in high school and dabbled. Now I want to get serious after a huge hiatus. Question 1: I've read it's counter-productive to learn C first, then C++ or C# because you develop bad habits. In a lot of college courses I've looked at, learning C/C++ is mandatory to advance. Should I ever bother learning C? On a related note, I really don't understand the difference between C and C++, or C# for the matter other than it incorporates .NET (which, I understand, is a compilation of tools and libraries that make programming easier and faster). Question 2: Where did you guys learn to program? Where do you recommend? Is it possible to land a job programming being self-taught? Is my best chance an ITT tech or a regular college? I was going to enroll in a JC and go from there but I can't decide what to do. LAST question :) I heard C++ is being "ported" to .NET. True? And if so, is this going to make C++ a solid, in-demand language to learn? Thanks for looking. :)

    Read the article

  • What You Said: How Do You Browse Securely Away From Home?

    - by Jason Fitzpatrick
    Responses to this week’s Ask the Reader question show that just because you’re away from home doesn’t mean you have to give up the security and privacy that your home network provides. Earlier this week we asked you to share you browsing away from home security tips and tricks and obliged. JC offered one of the more entertaining tales of away-from-home browsing: Recently a bunch of us stayed at a high end resort down in Mexico. Internet was offered as a pay per device service at about $80/week/device. Considering we had about 12 wifi devices there among us(a few geeks), I decided to plan ahead. I setup a WRT54G as a WiFi client with a vpn back to my house and NAT. Setup a second one as a basic wireless access point with password and plugged it into the first. Onsite we setup the devices and connected to the wireless with one paid account(tied to the MAC address). Everyone connected to the other device for wireless access and it was all tunnelled through my home network with encryption. HTG Explains: Learn How Websites Are Tracking You Online Here’s How to Download Windows 8 Release Preview Right Now HTG Explains: Why Linux Doesn’t Need Defragmenting

    Read the article

  • Translate ImageButton from C# to XAML

    - by Bill
    I worked out the C# code to create an ImageButton (below) that has three images (one base-image and two overlays) and three text boxes as the face of the button. I am inheriting from the Button class, which unfortunately includes several components that I didn't realize would surface until after coding and need to remove, namely the bright-blue surrounding border on IsMouseOver, and any visible borders between the buttons, as the buttons will end up in a wrapPanel and the borders need to be seamless. Now that the format has been worked out in C#, I expect that I need to translate to XAML so that I can create a ControlTemplate to get the functionality necessary, however I am not certain as to the process of translating from C# to XAML. Can anyone steer me in the right direction? public class ACover : Button { Image cAImage = null; Image jCImage = null; Image jCImageOverlay = null; TextBlock ATextBlock = null; TextBlock AbTextBlock = null; TextBlock ReleaseDateTextBlock = null; private string _TracksXML = ""; public ACover() { Grid cArtGrid = new Grid(); cArtGrid.Background = new SolidColorBrush(Color.FromRgb(38, 44, 64)); cArtGrid.Margin = new System.Windows.Thickness(5, 10, 5, 10); RowDefinition row1 = new RowDefinition(); row1.Height = new GridLength(225); RowDefinition row2 = new RowDefinition(); row2.Height = new GridLength(0, GridUnitType.Auto); RowDefinition row3 = new RowDefinition(); row3.Height = new GridLength(0, GridUnitType.Auto); RowDefinition row4 = new RowDefinition(); row4.Height = new GridLength(0, GridUnitType.Auto); cArtGrid.RowDefinitions.Add(row1); cArtGrid.RowDefinitions.Add(row2); cArtGrid.RowDefinitions.Add(row3); cArtGrid.RowDefinitions.Add(row4); ColumnDefinition col1 = new ColumnDefinition(); col1.Width = new GridLength(0, GridUnitType.Auto); cArtGrid.ColumnDefinitions.Add(col1); jCImage = new Image(); jCImage.Height = 240; jCImage.Width = 260; jCImage.VerticalAlignment = VerticalAlignment.Top; jCImage.Source = new BitmapImage(new Uri(Properties.Settings.Default.pathToGridImages + "jc.png", UriKind.Absolute)); cArtGrid.Children.Add(jCImage); cArtImage = new Image(); cArtImage.Height = 192; cArtImage.Width = 192; cArtImage.Margin = new System.Windows.Thickness(3, 7, 0, 0); cArtImage.VerticalAlignment = VerticalAlignment.Top; cArtGrid.Children.Add(cArtImage); jCImageOverlay = new Image(); jCImageOverlay.Height = 192; jCImageOverlay.Width = 192; jCImageOverlay.Margin = new System.Windows.Thickness(3, 7, 0, 0); jCImageOverlay.VerticalAlignment = VerticalAlignment.Top; jCImageOverlay.Source = new BitmapImage(new Uri( Properties.Settings.Default.pathToGridImages + "jc-overlay.png", UriKind.Absolute)); coverArtGrid.Children.Add(jCImageOverlay); ATextBlock = new TextBlock(); ATextBlock.Foreground = new SolidColorBrush(Color.FromRgb(173, 176, 198)); ATextBlock.Margin = new Thickness(10, -10, 0, 0); cArtGrid.Children.Add(ATextBlock); AlTextBlock = new TextBlock(); AlTextBlock.Margin = new Thickness(10, 0, 0, 0); AlTextBlock.Foreground = new SolidColorBrush(Color.FromRgb(173, 176, 198)); cArtGrid.Children.Add(AlTextBlock); RDTextBlock = new TextBlock(); RDTextBlock.Margin = new Thickness(10, 0, 0, 0); RDTextBlock.Foreground = new SolidColorBrush(Color.FromRgb(173, 176, 198)); cArtGrid.Children.Add(RDTextBlock); Grid.SetColumn(jCImage, 0); Grid.SetRow(jCImage, 0); Grid.SetColumn(jCImageOverlay, 0); Grid.SetRow(jCImageOverlay, 0); Grid.SetColumn(cArtImage, 0); Grid.SetRow(cArtImage, 0); Grid.SetColumn(ATextBlock, 0); Grid.SetRow(ATextBlock, 1); Grid.SetColumn(AlTextBlock, 0); Grid.SetRow(AlTextBlock, 2); Grid.SetColumn(RDTextBlock, 0); Grid.SetRow(RDTextBlock, 3); this.Content = cArtGrid; } public string A { get { if (ATextBlock != null) return ATextBlock.Text; else return String.Empty; } set { if (ATextBlock != null) ATextBlock.Text = value; } } public string Al { get { if (AlTextBlock != null) return AlTextBlock.Text; else return String.Empty; } set { if (AlTextBlock != null) AlTextBlock.Text = value; } } public string RD { get { if (RDTextBlock != null) return RDTextBlock.Text; else return String.Empty; } set { if (RDTextBlock != null) RDTextBlock.Text = value; } } public ImageSource Image { get { if (cArtImage != null) return cArtImage.Source; else return null; } set { if (cArtImage != null) cArtImage.Source = value; } } public string TracksXML { get { return _TracksXML; } set { _TracksXML = value; } } public double ImageWidth { get { if (cArtImage != null) return cArtImage.Width; else return double.NaN; } set { if (cArtImage != null) cArtImage.Width = value; } } public double ImageHeight { get { if (cArtImage != null) return cArtImage.Height; else return double.NaN; } set { if (cArtImage != null) cArtImage.Height = value; } } }

    Read the article

  • Unexpected JAXB error

    - by Mark Lewis
    Hello, From the documentation it's clear I need to use the following to get a simple unmarshalling to occur from my XML file/schema: JAXBContext jc = JAXBContext.newInstance("PackageName"); where PackageName is my package name. I've looked on google for a bit to no avail, to find out why I'm then getting this runtime error: Line:Col[2:142]:cvc-elt.1: Cannot find the declaration of element 'myconfig'. Line:Col[2:142]:unexpected element (uri:"http://www.w3.org", local:"myconfig"). Expected elements are <{}myconfig> Caught UnmarshalException This occurs at the top of all my class files, including the ones the XJC plugin for eclipse created for me (which I then moved out of PackageName.PackageName which it automatically created): package PackageName; so why is this error occurring?

    Read the article

  • Looking for PCA snippet/source code in C++

    - by jihchuan
    Hi, I'm currently developing a software to compare 2 images. I start with extract the image's RGB values, form a matrix of array and then attempt to compress the values using PCA, and then match/recognize it with a pre-set data to find its similarity. But I can't proceed with the PCA part. (I'm using C++, C also can) If there any library/source code/snippet for it please let me know, or if there're any recommendation on my case also very welcomed!! I'd appreciate your helps!! Thanks! JC, [email protected]

    Read the article

  • How do I stop icons appearing on the desktop in a particular area?

    - by Seamus
    When I download something to my desktop, or insert a CD or flash drive, the icon appears on my desktop. When I have conky running, the icon sometimes appears in the top right corner, underneath conky; where I can't see it. How do I stop this happening? My .conkyrc is pasted below. I didn't write it all myself, so I'm not entirely sure what I need to change, or what parts are relevant for this particular question... # UBUNTU-CONKY # A comprehensive conky script, configured for use on # Ubuntu / Debian Gnome, without the need for any external scripts. # # Based on conky-jc and the default .conkyrc. # INCLUDES: # - tail of /var/log/messages # - netstat shows number of connections from your computer and application/PID making it. Kill spyware! # # -- Pengo # # Create own window instead of using desktop (required in nautilus) own_window yes own_window_type override own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager # Use double buffering (reduces flicker, may not work for everyone) double_buffer yes # fiddle with window use_spacer right # Use Xft? use_xft yes xftfont DejaVu Sans:size=8 xftalpha 0.8 text_buffer_size 2048 # Update interval in seconds update_interval 3.0 # Minimum size of text area # minimum_size 250 5 # Draw shades? draw_shades no # Text stuff draw_outline no # amplifies text if yes draw_borders no uppercase no # set to yes if you want all text to be in uppercase # Stippled borders? stippled_borders 3 # border margins border_margin 9 # border width border_width 10 # Default colors and also border colors, grey90 == #e5e5e5 default_color grey own_window_colour brown own_window_transparent yes # Text alignment, other possible values are commented #alignment top_left alignment top_right #alignment bottom_left #alignment bottom_right # Gap between borders of screen and text gap_x 10 gap_y 20 # stuff after 'TEXT' will be formatted on screen TEXT $color ${color orange}SYSTEM ${hr 2}$color $nodename $sysname $kernel on $machine ${color orange}CPU ${hr 2}$color ${freq}MHz Load: ${loadavg} Temp: ${acpitemp} $cpubar ${cpugraph 000000 ffffff} NAME ${goto 150}PID ${goto 200}CPU% ${goto 250}MEM% ${top name 1} ${goto 150}${top pid 1} ${goto 200}${top cpu 1} ${goto 250}${top mem 1} ${top name 2} ${goto 150}${top pid 2} ${goto 200}${top cpu 2} ${goto 250}${top mem 2} ${top name 3} ${goto 150}${top pid 3} ${goto 200}${top cpu 3} ${goto 250}${top mem 3} ${top name 4} ${goto 150}${top pid 4} ${goto 200}${top cpu 4} ${goto 250}${top mem 4} ${color orange}MEMORY / DISK ${hr 2}$color RAM: $memperc% ${membar 6}$color Swap: $swapperc% ${swapbar 6}$color Home: ${fs_free_perc /home}% ${fs_bar 6 /}$color Free Space: ${fs_free /home} ${color orange}NETWORK (${addr eth0}) ${hr 2}$color Down: $color${downspeed eth0} k/s ${alignr}Up: ${upspeed eth0} k/s ${downspeedgraph eth0 25,140 000000 ff0000} ${alignr}${upspeedgraph eth0 25,140 000000 00ff00}$color Total: ${totaldown eth0} ${alignr}Total: ${totalup eth0} ${execi 30 netstat -ept | grep ESTAB | awk '{print $9}' | cut -d: -f1 | sort | uniq -c | sort -nr} ${color orange}WIRELESS (${addr wlan0}) ${hr 2}$color Down: $color${downspeed wlan0} k/s ${alignr}Up: ${upspeed wlan0} k/s ${downspeedgraph wlan0 25,140 000000 ff0000} ${alignr}${upspeedgraph wlan0 25,140 000000 00ff00}$color Total: ${totaldown wlan0} ${alignr}Total: ${totalup wlan0} ${execi 30 netstat -ept | grep ESTAB | awk '{print $9}' | cut -d: -f1 | sort | uniq -c | sort -nr} Conky solutions have been offered, but perhaps these aren't the best way of approaching it. What I really want is to stop icons even appearing in that part of the desktop window: that is, I want to make part of the desktop real estate "off-limits" to new icons appearing on the desktop.

    Read the article

  • How do I stop icons appearing on the desktop under conky?

    - by Seamus
    When I download something to my desktop, or insert a CD or flash drive, the icon appears on my desktop. When I have conky running, the icon sometimes appears in the top right corner, underneath conky; where I can't see it. How do I stop this happening? My .conkyrc is pasted below. I didn't write it all myself, so I'm not entirely sure what I need to change, or what parts are relevant for this particular question... # UBUNTU-CONKY # A comprehensive conky script, configured for use on # Ubuntu / Debian Gnome, without the need for any external scripts. # # Based on conky-jc and the default .conkyrc. # INCLUDES: # - tail of /var/log/messages # - netstat shows number of connections from your computer and application/PID making it. Kill spyware! # # -- Pengo # # Create own window instead of using desktop (required in nautilus) own_window yes own_window_type override own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager # Use double buffering (reduces flicker, may not work for everyone) double_buffer yes # fiddle with window use_spacer right # Use Xft? use_xft yes xftfont DejaVu Sans:size=8 xftalpha 0.8 text_buffer_size 2048 # Update interval in seconds update_interval 3.0 # Minimum size of text area # minimum_size 250 5 # Draw shades? draw_shades no # Text stuff draw_outline no # amplifies text if yes draw_borders no uppercase no # set to yes if you want all text to be in uppercase # Stippled borders? stippled_borders 3 # border margins border_margin 9 # border width border_width 10 # Default colors and also border colors, grey90 == #e5e5e5 default_color grey own_window_colour brown own_window_transparent yes # Text alignment, other possible values are commented #alignment top_left alignment top_right #alignment bottom_left #alignment bottom_right # Gap between borders of screen and text gap_x 10 gap_y 20 # stuff after 'TEXT' will be formatted on screen TEXT $color ${color orange}SYSTEM ${hr 2}$color $nodename $sysname $kernel on $machine ${color orange}CPU ${hr 2}$color ${freq}MHz Load: ${loadavg} Temp: ${acpitemp} $cpubar ${cpugraph 000000 ffffff} NAME ${goto 150}PID ${goto 200}CPU% ${goto 250}MEM% ${top name 1} ${goto 150}${top pid 1} ${goto 200}${top cpu 1} ${goto 250}${top mem 1} ${top name 2} ${goto 150}${top pid 2} ${goto 200}${top cpu 2} ${goto 250}${top mem 2} ${top name 3} ${goto 150}${top pid 3} ${goto 200}${top cpu 3} ${goto 250}${top mem 3} ${top name 4} ${goto 150}${top pid 4} ${goto 200}${top cpu 4} ${goto 250}${top mem 4} ${color orange}MEMORY / DISK ${hr 2}$color RAM: $memperc% ${membar 6}$color Swap: $swapperc% ${swapbar 6}$color Home: ${fs_free_perc /home}% ${fs_bar 6 /}$color Free Space: ${fs_free /home} ${color orange}NETWORK (${addr eth0}) ${hr 2}$color Down: $color${downspeed eth0} k/s ${alignr}Up: ${upspeed eth0} k/s ${downspeedgraph eth0 25,140 000000 ff0000} ${alignr}${upspeedgraph eth0 25,140 000000 00ff00}$color Total: ${totaldown eth0} ${alignr}Total: ${totalup eth0} ${execi 30 netstat -ept | grep ESTAB | awk '{print $9}' | cut -d: -f1 | sort | uniq -c | sort -nr} ${color orange}WIRELESS (${addr wlan0}) ${hr 2}$color Down: $color${downspeed wlan0} k/s ${alignr}Up: ${upspeed wlan0} k/s ${downspeedgraph wlan0 25,140 000000 ff0000} ${alignr}${upspeedgraph wlan0 25,140 000000 00ff00}$color Total: ${totaldown wlan0} ${alignr}Total: ${totalup wlan0} ${execi 30 netstat -ept | grep ESTAB | awk '{print $9}' | cut -d: -f1 | sort | uniq -c | sort -nr}

    Read the article

  • How do I set image position in conky

    - by realitygenerator
    I copied and modified an existing .conkyrc file from the ubuntu forum and I'm trying to place the LinuxMint logo in a specific position Below are my conkyrc file and the screenshot # UBUNTU-CONKY # A comprehensive conky script, configured for use on # Ubuntu / Debian Gnome, without the need for any external scripts. # # Based on conky-jc and the default .conkyrc. # INCLUDES: # - tail of /var/log/messages # - netstat shows number of connections from your computer and application/PID making it. Kill spyware! # # -- Pengo # # Create own window instead of using desktop (required in nautilus) own_window yes own_window_type desktop own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager # Use double buffering (reduces flicker, may not work for everyone) double_buffer yes # fiddle with window use_spacer right # Use Xft? use_xft yes xftfont URW Gothic:size=8 xftalpha 0.8 text_buffer_size 2048 # Update interval in seconds update_interval 3.0 # Minimum size of text area # minimum_size 250 5 # Draw shades? draw_shades no # Text stuff draw_outline no # amplifies text if yes draw_borders no uppercase no # set to yes if you want all text to be in uppercase # Stippled borders? stippled_borders 3 # border margins border_margin 9 # border width border_width 10 # Default colors and also border colors, grey90 == #e5e5e5 default_color grey own_window_colour brown own_window_transparent yes # Text alignment, other possible values are commented #alignment top_left #alignment top_right #alignment bottom_left #alignment bottom_right. alignment top_middle # Gap between borders of screen and text gap_x 10 gap_y 10 #Display temp in fahrenheit temperature_unit fahrenheit #Choose which screen on which to display # stuff after 'TEXT' will be formatted on screen TEXT $color ${color green}SYSTEM ${hr 2}$color $nodename $sysname $kernel on $machine LinuxMint 11 "Katya" (Oneric) ${image ~/Conky/Logo_Linux_Mint.png -s 80x60 -f 86400} ${color green}CPU ${hr 2}$color ${freq}MHz Load: ${loadavg} Temp: ${hwmon temp 1} $cpubar ${cpugraph 000000 ffffff} NAME PID CPU% MEM% ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4} ${color green}MEMORY / DISK ${hr 2}$color RAM: $memperc% ${membar 6}$color Swap: $swapperc% ${swapbar 6}$color Root: ${fs_free_perc /}% ${fs_bar 6 /}$color hda1: ${fs_free_perc /media/sda1}% ${fs_bar 6 /media/sda1}$color ${color green}NETWORK (${addr eth1}) ${hr 2}$color Down: $color${downspeed eth1} k/s ${alignr}Up: ${upspeed eth1} k/s ${downspeedgraph eth1 25,140 000000 ff0000} ${alignr}${upspeedgraph eth1 25,140 000000 00ff00}$color Total: ${totaldown eth1} ${alignr}Total: ${totalup eth1} ${execi 30 netstat -ept | grep ESTAB | awk '{print $9}' | cut -d: -f1 | sort | uniq -c | sort -nr} ${color green}LOGGING ${hr 2}$color ${execi 30 tail -n3 /var/log/messages | awk '{print " ",$5,$6,$7,$8,$9,$10}' | fold -w50} ${color green}FORTUNE ${hr 2}$color ${execi 120 fortune -s | fold -w50} I want to put the mint logo right after the word (oneric). Any help would be greatly appreciated.

    Read the article

  • JAXB Web Services: Multiple Object Marshalling

    - by Luke Evans
    I can marshal and unmarshal 1 object with no problems (in netbeans); I need to know how to do this with multiple objects? I can't generate anything but null pointer exceptions when trying to unmarshal 3 objects into an array from XML; so I don't even know if I've marshalled the 3 out correctly. I know the basic idea of declaring the object, then using the jaxbu or jaxbm command, but I'd like to see this working for more than one object. **TLDR: How do I marshal/unmarshal multiple objects of a single class into/out of XML?? THANKS Code I have that marshals one object from XML: try { JAXBContext jc = JAXBContext.newInstance ("myOffers"); Unmarshaller u = jc.createUnmarshaller (); myOffers.Offer flight = (myOffers.Offer) u.unmarshal( new FileInputStream( "offers.xml" )); System.out.println ("Airline is : " + flight.getAirline()); System.out.println ("Origin is : " + flight.getOrigin()); System.out.println ("Destination is : " + flight.getDestination()); System.out.println ("Seats available : " + flight.getSeats()); System.out.println("Proximity to City Centre is : " + flight.getProximity()); System.out.println("Currency : " + flight.fare.getCurrency()); System.out.println("Value : " + flight.fare.getValue()); } catch (JAXBException e) { System.out.println("Error " + e);} ok so the Xml is: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns2:offer xmlns:ns2="http://simple.example.com/CInfoXmlDoc"> <Origin>Nottingham</Origin> <Destination>Istanbul</Destination> <Airline>Lufthansa</Airline> <Proximity>10</Proximity> <Seats>260</Seats> <Fare> <Currency>GBP</Currency> <Value>300</Value> </Fare> </ns2:offer> <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns2:offer xmlns:ns2="http://simple.example.com/CInfoXmlDoc"> <Origin>Birmingham</Origin> <Destination>Cairo</Destination> <Airline>Monarch</Airline> <Proximity>15</Proximity> <Seats>350</Seats> <Fare> <Currency>GBP</Currency> <Value>300</Value> </Fare> </ns2:offer> public static void main(String[] args) throws FileNotFoundException { int i = 0; int arraySize = 2; myOffers.Offer offer[] = new myOffers.Offer[arraySize]; offer[i] = new myOffers.Offer(); offer[i].fare = new myOffers.Offer.Fare(); offer[i].setAirline("Lufthansa"); offer[i].setOrigin("Nottingham"); offer[i].setDestination("Istanbul"); offer[i].setSeats(260); offer[i].setProximity(10); offer[i].fare.currency = "GBP"; offer[i].fare.value = 300; i++; offer[i] = new myOffers.Offer(); offer[i].fare = new myOffers.Offer.Fare(); offer[i].setAirline("Monarch"); offer[i].setOrigin("Birmingham"); offer[i].setDestination("Cairo"); offer[i].setSeats(350); offer[i].setProximity(15); offer[i].fare.currency = "GBP"; offer[i].fare.value = 300; try { int n = 0; FileOutputStream f = new FileOutputStream("offers.xml"); javax.xml.bind.JAXBContext jaxbCtx = javax.xml.bind.JAXBContext.newInstance(offer[n].getClass().getPackage().getName()); javax.xml.bind.Marshaller marshaller = jaxbCtx.createMarshaller(); marshaller.setProperty(javax.xml.bind.Marshaller.JAXB_ENCODING, "UTF-8"); //NOI18N marshaller.setProperty(javax.xml.bind.Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); while (n < arraySize) { marshaller.marshal(offer[n], f); n++; } } catch (javax.xml.bind.JAXBException ex) { // XXXTODO Handle exception java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.SEVERE, null, ex); //NOI18N } } Which was generated by my marshal code found here: public static void main(String[] args) throws FileNotFoundException { int i = 0; int arraySize = 2; myOffers.Offer offer[] = new myOffers.Offer[arraySize]; offer[i] = new myOffers.Offer(); offer[i].fare = new myOffers.Offer.Fare(); offer[i].setAirline("Lufthansa"); offer[i].setOrigin("Nottingham"); offer[i].setDestination("Istanbul"); offer[i].setSeats(260); offer[i].setProximity(10); offer[i].fare.currency = "GBP"; offer[i].fare.value = 300; i++; offer[i] = new myOffers.Offer(); offer[i].fare = new myOffers.Offer.Fare(); offer[i].setAirline("Monarch"); offer[i].setOrigin("Birmingham"); offer[i].setDestination("Cairo"); offer[i].setSeats(350); offer[i].setProximity(15); offer[i].fare.currency = "GBP"; offer[i].fare.value = 300; try { int n = 0; FileOutputStream f = new FileOutputStream("offers.xml"); javax.xml.bind.JAXBContext jaxbCtx = javax.xml.bind.JAXBContext.newInstance(offer[n].getClass().getPackage().getName()); javax.xml.bind.Marshaller marshaller = jaxbCtx.createMarshaller(); marshaller.setProperty(javax.xml.bind.Marshaller.JAXB_ENCODING, "UTF-8"); //NOI18N marshaller.setProperty(javax.xml.bind.Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); while (n < arraySize) { marshaller.marshal(offer[n], f); n++; } } catch (javax.xml.bind.JAXBException ex) { // XXXTODO Handle exception java.util.logging.Logger.getLogger("global").log(java.util.logging.Level.SEVERE, null, ex); //NOI18N } } Apologies, I'm fining this editor quite appalling but thats another matter. Whats wrong with [code][/code] tags...

    Read the article

  • Decompiling a *.DLL to assembly for .net in delphi 4

    - by Lex Dean
    I love my Delphi 4 but at the same time I see the need to talk to windows .net This is a recompiled dll that I found on sourceforge.net/projects/delphinet/ (DelphiNet03.zip) by some nice people that fund the dll from some were. The real answer is to make this dll so that fits into Delphi as true Delphi code, and not a dll clip on. So we can make objects that use dot net in Delphi. Because I’m not an assembly freak, I’m freaking out a little with a wee sweek for help! 1/ How do I link the asm code with the data info at the bottom of this code. Can some one show me which calls to look for to make this link to data. 2/ I need to find the beginning of all the procedures and functions, but I cannot find a ‘RET’ statement. And what line is the beginning statement in this code. 3/ How do I identify were the jump statements go to, put them into Delphi format In this code it looks I can do:- jle 402890h \1000:00402854 7e3a add [eax], al \1000:00402856 0000 …………………………………………….. or ch, [edi+3eh] \1000:0040288d 0a6f3e xrefs first: 1000:00402854 number : 1 \; add [eax], al \1000:00402890 0000 //******************************* jle @@21 \\1000:00402854 7e3a add [eax], al \\1000:00402856 0000 …………………………………………….. or ch, [edi+3eh] \1000:0040288d 0a6f3e xrefs first: 1000:00402854 number : 1 \; @@21 add [eax], al \1000:00402890 0000 Is that a correct conversion. I think a xrefs first: 1000:004021d1 number : 1 is the best to follow 4/ I need a good reference on 8086 up assembly code that I can print out and get to learn properly. I found this asm decomplier of http://www.cronos.cc/ that is so similar to Delphi that it only needs a little more convertion to get it into Delphi asm I think. It’s only taken me 3 hours to get the file into TMemo and to write a few lines to chop the line over in a stream and reload the memo. Help please Email: [email protected] xrefs first: 1000:004041ae number : 1 \\; dd 4190h \\1000:00402000 90410000 dd 00h \\1000:00402004 00000000 dec eax \\1000:00402008 48 add [eax], al \\1000:00402009 0000 add [edx], al \\1000:0040200b 0002 add [eax], al \\1000:0040200d 0000 add [eax-2bffffd2h], al \\1000:0040200f 00802e0000d4 adc al, [eax] \\1000:00402015 1200 add [ecx], al \\1000:00402017 0001 add [eax], al \\1000:00402019 0000 add [eax], al \\1000:0040201b 0000 add [eax], al \\1000:0040201d 0000 add [eax], al \\1000:0040201f 0000 add [eax], al \\1000:00402021 0000 add [eax], al \\1000:00402023 0000 add [eax], al \\1000:00402025 0000 add [eax], al \\1000:00402027 0000 add [eax], al \\1000:00402029 0000 add [eax], al \\1000:0040202b 0000 add [eax], al \\1000:0040202d 0000 add [eax], al \\1000:0040202f 0000 add [eax], al \\1000:00402031 0000 add [eax], al \\1000:00402033 0000 add [eax], al \\1000:00402035 0000 add [eax], al \\1000:00402037 0000 add [eax], al \\1000:00402039 0000 add [eax], al \\1000:0040203b 0000 add [eax], al \\1000:0040203d 0000 add [eax], al \\1000:0040203f 0000 add [eax], al \\1000:00402041 0000 add [eax], al \\1000:00402043 0000 add [eax], al \\1000:00402045 0000 add [eax], al \\1000:00402047 0000 add [eax], al \\1000:00402049 0000 add [eax], al \\1000:0040204b 0000 add [eax], al \\1000:0040204d 0000 add [ebx], dl \\1000:0040204f 0013 xor [eax+eax], al \\1000:00402051 300400 or al, [ecx] \\1000:00402054 0a01 add [eax], al \\1000:00402056 0000 add [eax], eax \\1000:00402058 0100 add [ecx], dl \\1000:0040205a 0011 push cs \\1000:0040205c 0e add al, 50h \\1000:0040205d 0450 mov gs, [ecx+05h] \\1000:0040205f 8e6905 push eax \\1000:00402062 50 mov gs, [ecx+2eh] \\1000:00402063 8e692e add eax, f938h \\1000:00402066 0538f90000 add [ebx], al \\1000:0040206b 0003 jc 402070h \\1000:0040206d 7201 add [eax], al \\1000:0040206f 0000 jo 40209bh \\1000:00402071 7028 add al, [eax] \\1000:00402073 0200 add [edx], cl \\1000:00402075 000a sub eax, 36f0408h \\1000:00402077 2d08046f03 add [eax], al \\1000:0040207c 0000 or ch, [ebx] \\1000:0040207e 0a2b push es \\1000:00402080 06 add al, 6fh \\1000:00402081 046f add al, 00h \\1000:00402083 0400 add [edx], cl \\1000:00402085 000a adc eax, [edi] \\1000:00402087 1307 push ss \\1000:00402089 16 adc ecx, [eax] \\1000:0040208a 1308 cmp cl, cl \\1000:0040208c 38c9 add [eax], al \\1000:0040208e 0000 add [ecx], dl \\1000:00402090 0011 pop es \\1000:00402092 07 adc [eax], ecx \\1000:00402093 1108 callf 056f:060a9a08h \\1000:00402095 9a0a066f05 add [eax], al \\1000:0040209a 0000 or cl, [ebx] \\1000:0040209c 0a0b push es \\1000:0040209e 06 outsd \\1000:0040209f 6f push es \\1000:004020a0 06 add [eax], al \\1000:004020a1 0000 or al, [ebx] \\1000:004020a3 0a03 sub [edx], al \\1000:004020a5 2802 add [eax], al \\1000:004020a7 0000 or bh, [ecx] \\1000:004020a9 0a39 movsd \\1000:004020ab a5 add [eax], al \\1000:004020ac 0000 add [edi], al \\1000:004020ae 0007 mov gs, [ecx+0eh] \\1000:004020b0 8e690e add al, 50h \\1000:004020b3 0450 mov gs, [ecx+40h] \\1000:004020b5 8e6940 cwde \\1000:004020b8 98 add [eax], al \\1000:004020b9 0000 add [edi], dl \\1000:004020bb 0017 or al, 16h \\1000:004020bd 0c16 or eax, 9072b2bh \\1000:004020bf 0d2b2b0709 callf 0000:076f9a09h \\1000:004020c4 9a6f070000 or ch, [edi+08h] \\1000:004020c9 0a6f08 add [eax], al \\1000:004020cc 0000 or ch, [eax+ebx] \\1000:004020ce 0a2c18 push cs \\1000:004020d1 0e add al, 50h \\1000:004020d2 0450 or [edx+d72h], ebx \\1000:004020d4 099a720d0000 jo 402104h \\1000:004020da 7028 or [eax], eax \\1000:004020dc 0900 add [edx], cl \\1000:004020de 000a add dl, cs:[esi] \\1000:004020e0 2e0216 or al, 08h \\1000:004020e3 0c08 sub eax, 90c2b02h \\1000:004020e5 2d022b0c09 pop ss \\1000:004020ea 17 pop eax \\1000:004020eb 58 or eax, 50040e09h \\1000:004020ec 0d090e0450 mov gs, [ecx+32h] \\1000:004020f1 8e6932 int 08h \\1000:004020f4 cd08 sub al, 5ch \\1000:004020f6 2c5c push ss \\1000:004020f8 16 adc eax, [ebx+ebp] \\1000:004020f9 13042b dec esi \\1000:004020fc 4e push cs \\1000:004020fd 0e add al, 50h \\1000:004020fe 0450 adc [edx+ebx*4], eax \\1000:00402100 11049a jc 402112h \\1000:00402103 720d add [eax], al \\1000:00402105 0000 jo 402131h \\1000:00402107 7028 or [eax], eax \\1000:00402109 0900 add [edx], cl \\1000:0040210b 000a xor esi, [esi] \\1000:0040210d 3336 pop es \\1000:0040210f 07 adc [edx+ebx*4], eax \\1000:00402110 11049a outsd \\1000:00402113 6f pop es \\1000:00402114 07 add [eax], al \\1000:00402115 0000 or ch, [edi+0ah] \\1000:00402117 0a6f0a add [eax], al \\1000:0040211a 0000 or dl, [ebx] \\1000:0040211c 0a13 push es \\1000:0040211e 06 add eax, 9a041150h \\1000:0040211f 055011049a sub [ebx], cl \\1000:00402124 280b add [eax], al \\1000:00402126 0000 or dl, [edx] \\1000:00402128 0a12 push es \\1000:0040212a 06 adc al, [c28h] \\1000:0040212b 1205280c0000 xrefs first: 1000:00402107 number : 1 \\; or ch, [edx+eax] \\1000:00402131 0a2c02 sub ebx, [esi] \\1000:00402134 2b1e push cs \\1000:00402136 0e add al, 50h \\1000:00402137 0450 adc [edi+eax], eax \\1000:00402139 110407 adc [edx+ebx*4], eax \\1000:0040213c 11049a outsd \\1000:0040213f 6f pop es \\1000:00402140 07 add [eax], al \\1000:00402141 0000 or ah, [edx+58170411h] \\1000:00402143 0aa211041758 adc eax, [ecx+edx] \\1000:00402149 130411 add al, 0eh \\1000:0040214c 040e add al, 50h \\1000:0040214e 0450 mov gs, [ecx+32h] \\1000:00402150 8e6932 test eax, 58170811h \\1000:00402153 a911081758 adc ecx, [eax] \\1000:00402158 1308 adc [eax], ecx \\1000:0040215a 1108 adc [edi], eax \\1000:0040215c 1107 mov gs, [ecx+3fh] \\1000:0040215e 8e693f sub al, ffh \\1000:00402161 2cff db ff \\1000:00402163 ff jmp [edx] \\1000:00402164 ff2a add [eax], al \\1000:00402166 0000 adc esi, [eax] \\1000:00402168 1330 add eax, 8100h \\1000:0040216a 0500810000 add [edx], al \\1000:0040216f 0002 add [eax], al \\1000:00402171 0000 adc [edx+esi*2], eax \\1000:00402173 110472 xor eax, [eax] \\1000:00402176 3300 add [eax+28h], dh \\1000:00402178 007028 add al, [eax] \\1000:0040217b 0200 add [edx], cl \\1000:0040217d 000a sub al, 09h \\1000:0040217f 2c09 add ebp, [eax] \\1000:00402181 0328 or eax, a0a0000h \\1000:00402183 0d00000a0a sub eax, [edi] \\1000:00402188 2b07 add al, 28h \\1000:0040218a 0428 push cs \\1000:0040218c 0e add [eax], al \\1000:0040218d 0000 or cl, [edx] \\1000:0040218f 0a0a push es \\1000:00402191 06 add eax, f6f1717h \\1000:00402192 0517176f0f add [eax], al \\1000:00402197 0000 or cl, [ebx] \\1000:00402199 0a0b push ss \\1000:0040219b 16 lea eax, [edx] \\1000:0040219c 8d02 add [eax], al \\1000:0040219e 0000 add [esi+ecx], ecx \\1000:004021a0 010c0e add al, 2ch \\1000:004021a3 042c push cs \\1000:004021a5 260e add al, 8eh \\1000:004021a7 048e c160d imul edi, [eax+28dh], d160c01h \\1000:004021a9 69b88d020000010c sub edx, [eax] \\1000:004021b3 2b10 or [ecx], cl \\1000:004021b5 0809 push cs \\1000:004021b7 0e add al, 09h \\1000:004021b8 0409 callf 0000:106f9a09h \\1000:004021ba 9a6f100000 or ah, [edx+d581709h] \\1000:004021bf 0aa20917580d or [esi], ecx \\1000:004021c5 090e add al, 8eh \\1000:004021c7 048e imul esi, [edx], 17202e9h \\1000:004021c9 6932e9027201 add [eax], al \\1000:004021cf 0000 jo 4021dah \\1000:004021d1 7007 db 0f \\1000:004021d3 0f add al, 12h \\1000:004021d4 0412 add ch, [eax] \\1000:004021d6 0228 add [eax], eax \\1000:004021d8 0100 xrefs first: 1000:004021d1 number : 1 \\; add [esi], al \\1000:004021da 0006 pop es \\1000:004021dc 07 or [edi+11h], ch \\1000:004021dd 086f11 add [eax], al \\1000:004021e0 0000 or dl, [ebx] \\1000:004021e2 0a13 add al, 11h \\1000:004021e4 0411 add al, 0eh \\1000:004021e6 040e add al, 6fh \\1000:004021e8 046f adc al, [eax] \\1000:004021ea 1200 add [edx], cl \\1000:004021ec 000a adc eax, [511002bh] \\1000:004021ee 13052b001105 sub al, [eax] \\1000:004021f4 2a00 add [eax], al \\1000:004021f6 0000 adc esi, [eax] \\1000:004021f8 1330 add eax, 4e00h \\1000:004021fa 05004e0000 add [ebx], al \\1000:004021ff 0003 add [eax], al \\1000:00402201 0000 adc [ebx], eax \\1000:00402203 1103 outsd \\1000:00402205 6f adc [eax], al \\1000:00402206 1000 add [edx], cl \\1000:00402208 000a or al, [8db8698eh] \\1000:0040220a 0a058e69b88d add al, [eax] \\1000:00402210 0200 add [ecx], al \\1000:00402212 0001 or edx, [esi] \\1000:00402214 0b16 or al, 2bh \\1000:00402216 0c2b db 0f \\1000:00402218 0f pop es \\1000:00402219 07 or [106f9a08h], al \\1000:0040221a 0805089a6f10 add [eax], al \\1000:00402220 0000 or ah, [edx+c581708h] \\1000:00402222 0aa20817580c or [eb32698eh], al \\1000:00402228 08058e6932eb add al, [esi+eax] \\1000:0040222e 020406 lsl edx, [edx] \\1000:00402231 0f0312 add [eax], ebp \\1000:00402234 0128 add [eax], eax \\1000:00402236 0100 add [esi], al \\1000:00402238 0006 push es \\1000:0040223a 06 add al, 07h \\1000:0040223b 0407 outsd \\1000:0040223d 6f adc eax, [eax] \\1000:0040223e 1300 add [edx], cl \\1000:00402240 000a or eax, 6f050309h \\1000:00402242 0d0903056f adc al, 00h \\1000:00402247 1400 add [edx], cl \\1000:00402249 000a adc eax, [ebx+ebp] \\1000:0040224b 13042b add [ecx], dl \\1000:0040224e 0011 add al, 2ah \\1000:00402250 042a add [eax], al \\1000:00402252 0000 adc esi, [eax] \\1000:00402254 1330 add eax, 7600h \\1000:00402256 0500760000 add [eax+eax], al \\1000:0040225b 000400 add [ecx], dl \\1000:0040225e 0011 add al, 72h \\1000:00402260 0472 xor eax, [eax] \\1000:00402262 3300 add [eax+28h], dh \\1000:00402264 007028 add al, [eax] \\1000:00402267 0200 add [edx], cl \\1000:00402269 000a sub al, 09h \\1000:0040226b 2c09 add ebp, [eax] \\1000:0040226d 0328 or eax, a0a0000h \\1000:0040226f 0d00000a0a sub eax, [edi] \\1000:00402274 2b07 add al, 28h \\1000:00402276 0428 push cs \\1000:00402278 0e add [eax], al \\1000:00402279 0000 or cl, [edx] \\1000:0040227b 0a0a push es \\1000:0040227d 06 add eax, f6f1717h \\1000:0040227e 0517176f0f add [eax], al \\1000:00402283 0000 or cl, [ebx] \\1000:00402285 0a0b push cs \\1000:00402287 0e add eax, 8db8698eh \\1000:00402288 058e69b88d add al, [eax] \\1000:0040228d 0200 add [ecx], al \\1000:0040228f 0001 or al, 16h \\1000:00402291 0c16 or eax, 908102bh \\1000:00402293 0d2b100809 push cs \\1000:00402298 0e add eax, 106f9a09h \\1000:00402299 05099a6f10 add [eax], al \\1000:0040229e 0000 or ah, [edx+d581709h] \\1000:004022a0 0aa20917580d or [esi], ecx \\1000:004022a6 090e add eax, e932698eh \\1000:004022a8 058e6932e9 add cl, [esi] \\1000:004022ad 020e add al, 07h \\1000:004022af 0407 db 0f \\1000:004022b1 0f add eax, 1280212h \\1000:004022b2 0512022801 add [eax], al \\1000:004022b7 0000 push es \\1000:004022b9 06 pop es \\1000:004022ba 07 push cs \\1000:004022bb 0e add al, 08h \\1000:004022bc 0408 outsd \\1000:004022be 6f adc eax, [eax] \\1000:004022bf 1300 add [edx], cl \\1000:004022c1 000a adc eax, [ecx+edx] \\1000:004022c3 130411 add al, 14h \\1000:004022c6 0414 push cs \\1000:004022c8 0e add eax, 146fh \\1000:004022c9 056f140000 or dl, [ebx] \\1000:004022ce 0a13 add eax, 511002bh \\1000:004022d0 052b001105 sub al, [eax] \\1000:004022d5 2a00 add [ebx], dl \\1000:004022d7 0013 xor [eax+eax], al \\1000:004022d9 300400 jbe 4022deh \\1000:004022dc 7600 xrefs first: 1000:004022dc number : 1 \\; add fs:[esi+45h], cl \\1000:004034fc 64004e45 push esp \\1000:00403500 54 dec ecx \\1000:00403501 49 xrefs first: 1000:004034b2 number : 1 \\; outsb \\1000:00403502 6e jbe 403574h \\1000:00403503 766f imul esp, [ebp+43h], 6ch \\1000:00403505 6b65436c popad \\1000:00403509 61 jnc 40357fh \\1000:0040350a 7373 dec ebp \\1000:0040350c 4d jz 403578h \\1000:0040350d 657468 outsd \\1000:00403510 6f add fs:[esi+45h], cl \\1000:00403511 64004e45 push esp \\1000:00403515 54 push ebx \\1000:00403516 53 jz 40355fh \\1000:00403517 657445 outsb \\1000:0040351a 6e jnz 40358ah \\1000:0040351b 756d push esi \\1000:0040351d 56 xrefs first: 1000:004034b7 number : 1 \\; popad \\1000:0040351e 61 insb \\1000:0040351f 6c jnz 403587h \\1000:00403520 7565 add [esi+45h], cl \\1000:00403522 004e45 push esp \\1000:00403525 54 inc edi \\1000:00403526 47 db 65 ;'e' \\1000:00403527 65 xrefs first: 1000:004034be number : 1 \\; db 74 ;'t' \\1000:00403528 74 db 50 ;'p' \\1000:00403529 50 db 72 ;'r' \\1000:0040352a 72 db 6f ;'o' \\1000:0040352b 6f db 70 ;'p' \\1000:0040352c 70 db 65 ;'e' \\1000:0040352d 65 db 72 ;'r' \\1000:0040352e 72 db 74 ;'t' \\1000:0040352f 74 db 79 ;'y' \\1000:00403530 79 db 00 \\1000:00403531 00 db 4e ;'n' \\1000:00403532 4e db 45 ;'e' \\1000:00403533 45 db 54 ;'t' \\1000:00403534 54 db 47 ;'g' \\1000:00403535 47 db 65 ;'e' \\1000:00403536 65 db 74 ;'t' \\1000:00403537 74 db 46 ;'f' \\1000:00403538 46 db 69 ;'i' \\1000:00403539 69 db 65 ;'e' \\1000:0040353a 65 db 6c ;'l' \\1000:0040353b 6c db 64 ;'d' \\1000:0040353c 64 db 00 \\1000:0040353d 00 could not fit the rest in because of Stack overflow limitions

    Read the article

  • NASM - Load code from USB Drive

    - by new123456
    Hola, Would any assembly gurus know the argument (register dl) that signifies the first USB drive? I'm working through a couple of NASM tutorials, and would like to get a physical boot (I can get a clean one with qemu). This is the section of code that loads the "kernel" data from disk: loadkernel: mov si, LMSG ;; 'Loading kernel',13,10,0 call prints ;; ex puts() mov dl, 0x00 ;; The disk to load from mov ah, 0x02 ;; Read operation mov al, 0x01 ;; Sectors to read mov ch, 0x00 ;; Track mov cl, 0x02 ;; Sector mov dh, 0x00 ;; Head mov bx, 0x2000 ;; Buffer end mov es, bx mov bx, 0x0000 ;; Buffer start int 0x13 jc loadkernel mov ax, 0x2000 mov ds, ax jmp 0x2000:0x00 If it makes any difference, I'm running a stock Dell Inspiron 15 BIOS. Apparently, the correct value for me is 0x80. The BIOS loads the hard drives and labels them starting at 0x80 according to this answer. My particular BIOS decides to load the USB drive up as the first, for some reason, so I can boot from there.

    Read the article

  • Granite DS Actionscript Code Generation Ant cannot find class error

    - by Roaders
    I am trying to get my Ant build to run the granite DS Actionscript code generation task and am running into some problems. At the moment I am getting this error: BUILD FAILED C...\build.xml:62: Could not load Java class file: SampleDTOOne.class So the .class files are obviously being found. I am not however sure if this error means that the it cannot load the .class file or that it cannot find the actual java source code. My Ant task definition looks like this: <classpath> <pathelement location="C.../src/packages/" /> </classpath> <fileset dir="${base.build.dir}/jc/classes/gpbit/packageName"> <include name="*.class" /> </fileset> </gas3> I have tried many different values for the classpath but cannot get anythign to work. I do not like the path that I am using to find the .class files but again at the moment this is the only one I can get to work. None of the variables seem to make it any easier to get to this location. The fileset is definitely working as it definitely found the .clas files to include the name in the error message. More detailed error message: [gas3] Using output dir: C...trunk\plugin\build/etc/src/as3 [gas3] Using classpath: C...\trunk\plugin\src\packages [gas3] Loading all Java classes referenced by inner fileset(s) { [gas3] java.lang.ClassNotFoundException: SampleDTOOne [gas3] at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1361) any help much appreciated

    Read the article

  • Correct use of a "for...in" loop in javascript?

    - by jnkrois
    Hello everybody, before I ask my question I wanted to let everybody know that I appreciate the fact that there's always somebody out there willing to help, and on my end I'll try to give back to the community as much as I can. Thanks Now, I would like to get some pointers as to how to properly take advantage of the "for...in" loop in JavaScript, I already did some research and tried a couple things but it is still not clear to me how to properly use it. Let's say I have a random number of "select" tags in an HTML form, and I don't require the user to select an option for all of them, they can leave some untouched if they want. However I need to know if they selected none or at least one. The way I'm trying to find out if the user selected any of them is by using the "for...in" loop. For example: var allSelected = $("select option:selected"); var totalSelected = $("select option:selected").length; The first variable produces an array of all the selected options. The second variable tells me how many selected options I have in the form (select tags could be more than one and it changes every time). Now, in order to see if any has been selected I loop through each element (selected option), and retrieve the "value" attribute. The default "option" tag has a value="0", so if any selected option returns a value greater than 0, I know at least one option has been selected, however it does not have to be in order, this is my loop so far: for(var i = 0; i < totalSelected; i++){ var eachOption = $(allSelected[i]).val(); var defaultValue = 0; if(eachOption == defaultValue){ ...redirect to another page }else if(eachOption > defaultValue){ ... I display an alert } } My problem here is that as soon as the "if" matches a 0 value, it sends the user to the next page without testing the rest of the elements in the array, and the user could have selected the second or third options. What I really want to do is check all the elements in the array and then take the next action, in my mind this is how I could do it, but I'm not getting it right: var randomValue = 25; for(randomValue in allSelected){ var found = true; var notFound = false if(found){ display an alert }else{ redirect to next page } } This loop or the logic I'm using are flawed (I'm pretty sure), what I want to do is test all the elements in the array against a single variable and take the next action accordingly. I hope this makes some sense to you guys, any help would be appreciated. Thanks, JC

    Read the article

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