Search Results

Search found 861 results on 35 pages for 'denis gray'.

Page 4/35 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Is it possible to use JSONP on the server?

    - by Denis Hoctor
    Hi all, I'm stuck on a clients host that has medium trust setup which blocks cross domain requests and need data from a 3rd party domain. I now have the option to use JSONP. I've used JSONP from the client with jQuery to get around the browsers cross domain security and I've used HttpWebRequest in ASP.Net 3.5. Is it possible to use JSON on the server and if so how? I don't think it is, but worth asking seeing as I already have this app written server side.... Thanks, Denis

    Read the article

  • Natural Search Engine Optimization - Don't "Game the System" Or You Will Get Banned!

    When focusing on natural search engine optimization, it is important that you keep the process "white hat." You see, when it comes to SEO, there are basically three schools of thought: White hat, Gray hat, and Black hat. As you can probably infer, white hat is following the rules, gray hat is a little in between, and black hat is going against parameters that Google and other major search engines have set for ethical SEO practices.

    Read the article

  • Set Height of Div Equal to Parent Tag

    - by Phong Dang
    Hello, I have a snip code HTML as below : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns:o="urn:schemas-microsoft-com:office:office" lang="en-us" dir="ltr"> <head> <meta http-equiv="X-UA-Compatible" content="IE=8" /> <meta name="GENERATOR" content="Microsoft SharePoint" /> <meta name="progid" content="SharePoint.WebPartPage.Document" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Expires" content="0" /> <title>Demo </title> <style type="text/css"> A { font-weight: normal; font-size: 10pt; text-decoration: none; } </style> <link rel="stylesheet" type="text/css" href="/_layouts/1033/styles/Themable/wiki.css?rev=AWRyZDbGxZSekWBubaxPXw%3D%3D" /> <link rel="stylesheet" type="text/css" href="/_layouts/1033/styles/Themable/corev4.css?rev=w9FW7ASZnUjiWWCtJEcnTw%3D%3D" /> </head> <body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" style="height:100%;"> <form method="" name="frm"> <table style="border-bottom: black 1px solid; border-left: black 1px solid; border-collapse: collapse; border-top: black 1px solid; border-right: black 1px solid" id="ctl00_m_g_510fd150_a968_41ee_a28d_d47ff4a7198e_BambooCalendarControl" height="100%"> <tbody> <tr> <td style="border-top: black 1px solid; border-right: black 1px solid" height="25" valign="top" rowspan="1" width="1%" align="right"> <span> <nobr>8:00 AM</nobr> </span> </td> <td style="border-bottom: #d4d0c8 1px dotted; background-color: #ccffcc; border-left: 0px; border-top: black 1px solid; border-right: black 1px solid" height="100%" valign="top" rowspan="8" width="50%"> <div style="border-bottom: gray 1px solid; border-left: gray 1px solid; background-color: #ffa500; height: 100%; overflow: hidden; border-top: gray 1px solid; border-right: gray 1px solid" nowrap width="100%" valign="top"> <a style="height: 100%; color: black" href="#"><font color="white">Item </font></a> </div> </td> <td style="border-bottom: #d4d0c8 1px dotted; border-left: 0px; border-top: black 1px solid; border-right: black 1px solid" height="25" valign="top" width="100%" colspan="1"> </td> </tr> <tr> <td style="border-bottom: black 1px solid; border-right: black 1px solid" height="25" valign="top" rowspan="1" width="1%" align="right"> </td> <td style="border-bottom: black 1px solid; border-left: 0px; border-right: black 1px solid" height="25" valign="top" width="100%" colspan="1"> </td> </tr> <tr> <td style="border-right: black 1px solid" height="25" valign="top" rowspan="1" width="1%" align="right"> <span> <nobr>9:00 AM</nobr> </span> </td> <td style="border-bottom: #d4d0c8 1px dotted; background-color: #ccffcc; border-left: 0px; border-right: black 1px solid" height="100%" valign="top" rowspan="4" width="50%"> <div style="border-bottom: gray 1px solid; border-left: gray 1px solid; background-color: #bdb76b; height: 100%; overflow: hidden; border-top: gray 1px solid; border-right: gray 1px solid" nowrap width="100%" valign="top"> <a style="height: 100%; color: black" title="" href="#"><font color="white">Item 2 </font> </a> </div> </td> </tr> <tr> <td style="border-bottom: black 1px solid; border-right: black 1px solid" height="25" valign="top" rowspan="1" width="1%" align="right"> </td> </tr> <tr style="border-left: medium none; border-right: #696969 1px solid"> <td style="border-right: black 1px solid" height="25" valign="top" rowspan="1" width="1%" align="right"> <span> <nobr>10:00 AM</nobr> </span> </td> </tr> <tr> <td style="border-bottom: black 1px solid; border-right: black 1px solid" height="25" valign="top" rowspan="1" width="1%" align="right"> </td> </tr> <tr> <td style="border-right: black 1px solid" height="25" valign="top" rowspan="1" width="1%" align="right"> <span> <nobr>11:00 AM</nobr> </span> </td> <td style="border-bottom: #d4d0c8 1px dotted; border-left: 0px; border-top: black 1px solid; border-right: black 1px solid" height="25" valign="top" width="100%" colspan="1"> </td> </tr> <tr> <td style="border-bottom: black 1px solid; border-right: black 1px solid" height="25" valign="top" rowspan="1" width="1%" align="right"> </td> <td style="border-bottom: black 1px solid; border-left: 0px; border-right: black 1px solid" height="25" valign="top" width="100%" colspan="2"> </td> </tr> </tbody> </table> </form> </body> </html> I set the height of the div 100% so that it full of TD but it did not effect. Please help me ! Thanks / PD

    Read the article

  • How to serialize a protected property in wcf

    - by Denis Rosca
    Hello, i need some help with wcf serializing. I have two classes Person and Address. The Address class looks like this: public class Adresa : IExtensibleDataObject { private Guid _id; [DataMember] protected virtual Guid Id { get { return _id; } set { _id = value; } } private ExtensionDataObject _extensionData; [DataMember] public virtual ExtensionDataObject ExtensionData { get { return _extensionData; } set { _extensionData = value; } } private string _street; [DataMember] public virtual string Street { get { return this._cUTAM; } set { this._cUTAM = value; } } private string _number; [DataMember] public virtual string Number { get { return this._number; } set { this._number = value; } } private string _postalCode; [DataMember] public virtual string PostalCode { get { return this._postalCode; } set { this._postalCode = value; } } // and some other stuff related to the address } The Person class looks like this: public class PersoanaFizica :IExtensibleDataObject { private Guid _id; [DataMember] protected virtual Guid Id { get { return _id; } set { _id = value; } } private ExtensionDataObject _extensionData; [DataMember] public virtual ExtensionDataObject ExtensionData { get { return _extensionData; } set { _extensionData = value; } } private string _firstName; [DataMember] public virtual string FirstName { get { return this._firstName; } set { this._firstName = value; } } private string _lastName; [DataMember] public virtual string LastName { get { return this._lastName; } set { this._lastName = value; } } } The problem is that when the wcf client the data the Id properties are set to a bunch of zeros ( something like 000000-0000-000000-0000000). Any ideas on why this is happening? Thanks, Denis.

    Read the article

  • How to serialize a protected property in wcf

    - by Denis Rosca
    Hello everyone, I have to classes (Person and Address) that i need to send via wcf, the classes look like this: public class PersoanaFizica :IExtensibleDataObject { [DataMember] private Guid _id; [DataMember(Name = "Id")] protected virtual Guid Id { get { return _id; } set { _id = value; } } private ExtensionDataObject _extensionData; public virtual ExtensionDataObject ExtensionData { get { return _extensionData; } set { _extensionData = value; } } private string _firstName; [Searchable(PropertyName="FirstName")] [DataMember] public virtual string FirstName { get { return this._firstName; } set { this._firstName = value; } } private string _lastName; [Searchable(PropertyName="LastName")] [DataMember] public virtual string LastName { get { return this._lastName; } set { this. _lastName = value; } } private Address _address; [Searchable(PropertyName="Address")] [DataMember] public virtual Address Address { get { return this._address; } set { this._address = value; } } } public class Address : IExtensibleDataObject { [DataMember] private Guid _id; [DataMember] public virtual Guid Id { get { return _id; } set { _id = value; } } private ExtensionDataObject _extensionData; public virtual ExtensionDataObject ExtensionData { get { return _extensionData; } set { _extensionData = value; } } private string _country; [Searchable(PropertyName="Country")] [DataMember] public virtual string Country { get { return this._country; } set { this._country = value; } } // and some other properties related to the address } The problem is that when i try to send them via wcf, the client recieves the Id properties set to 00000-0000-00000-00000 or smth like this. Any idea why this is happening? And how to serialize the proper values? Thanks,Denis.

    Read the article

  • jQuery .change() on Radio Button

    - by Denis Hoctor
    Hi folks, I must be missing something obvious here... I can't get .change() to fire on radio buttons? I have the code below live here! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Radio Button jQuery Change</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> console.log("parsed"); $("input[name='rdio']").change(function() { console.log("changed"); if ($("input[name='rdio']:checked").val() == 'a') $("output").text("a changed"); else if ($("input[name='rdio']:checked").val() == 'b') $("output").text("b changed"); else $("output").text("c changed"); }); </script> </head> <body> <div> <input type="radio" name="rdio" value="a" checked="checked" /> a <br/> <input type="radio" name="rdio" value="b" /> b <br/> <input type="radio" name="rdio" value="c" /> c </div> <h3>Output:</h3> <div id="output"></div> </body> </html> Can anyone see what I've missed? Thanks, Denis

    Read the article

  • How I can get output from 1st frame textfield input text to 2nd frame textArea

    - by soulgreen
    Here is my 1st frame - I want went I input text in textfield example name then click button report will display output to 2nd frame using textArea... please help me import java.awt.; import java.awt.event.; import javax.swing.; import javax.swing.border.; public class Order extends JFrame implements ActionListener { private JPanel pInfo,pN, pIC, pDate,Blank,pBlank, button, pTotal; private JLabel nameL,icL,DateL; private JTextField nameTF, icTF; private JFormattedTextField DateTF; private JButton calB,clearB,exitB,reportB; public Order() { Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); contentPane.setBackground(Color.gray); pInfo = new JPanel(); pN = new JPanel(); pIC = new JPanel(); pDate = new JPanel(); nameTF = new JTextField(30); icTF = new JTextField(30); DateTF = new JFormattedTextField(java.util.Calendar.getInstance().getTime()); DateTF.setEditable (false); DateTF.addActionListener(this); nameL = new JLabel(" NAME : ",SwingConstants.RIGHT); icL = new JLabel(" IC : ",SwingConstants.RIGHT); DateL = new JLabel(" DATE :",SwingConstants.RIGHT); pInfo.setLayout(new GridLayout(10,2,5,5)); pInfo.setBorder(BorderFactory.createTitledBorder (BorderFactory.createEtchedBorder(),"ORDER")); pN.add(nameL); pN.add(nameTF); pIC.add(icL); pIC.add(icTF); pDate.add(DateL); pDate.add(DateTF); pInfo.add(pN); pInfo.add(pIC); pInfo.add(pDate); pInfo.setBackground(Color.GRAY); pN.setBackground(Color.gray); pIC.setBackground(Color.gray); pDate.setBackground(Color.gray); nameL.setForeground(Color.black); icL.setForeground(Color.black); DateL.setForeground(Color.black); nameTF.setBackground(Color.pink); icTF.setBackground(Color.pink); DateTF.setBackground(Color.pink); contentPane.add(pInfo,BorderLayout.CENTER); Blank = new JPanel(); pBlank = new JPanel(); button = new JPanel(); calB = new JButton("CALCULATE"); calB.setToolTipText("Click to calculate"); clearB = new JButton("RESET"); clearB.setToolTipText("Click to clear"); reportB = new JButton ("REPORT"); reportB.setToolTipText ("Click to print"); exitB = new JButton("EXIT"); exitB.setToolTipText("Click to exit"); Blank.setLayout(new GridLayout(2,2)); Blank.setBorder(BorderFactory.createTitledBorder (BorderFactory.createEtchedBorder(),"")); button.setLayout(new GridLayout(1,4)); button.add(calB,BorderLayout.WEST); button.add(clearB,BorderLayout.CENTER); button.add(reportB,BorderLayout.CENTER); button.add(exitB,BorderLayout.EAST); Blank.add(pBlank); Blank.add(button); contentPane.add(Blank,BorderLayout.SOUTH); Blank.setBackground(Color.gray); pBlank.setBackground(Color.gray); calB.setForeground(Color.black); clearB.setForeground(Color.black); reportB.setForeground(Color.black); exitB.setForeground(Color.black); calB.setBackground(Color.pink); clearB.setBackground(Color.pink); reportB.setBackground(Color.pink); exitB.setBackground(Color.pink); calB.addActionListener(this); clearB.addActionListener(this); reportB.addActionListener(this); exitB.addActionListener(this); } public void actionPerformed(ActionEvent p) { if (p.getSource() == calB) { } else if (p.getSource() == clearB) { } else if (p.getSource () == reportB) { } else if (p.getSource() == exitB) { } } public static void main (String [] args) { Order frame = new Order(); frame.setTitle("Order"); frame.setSize(500,500); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setResizable(false); frame.setVisible(true); frame.setLocationRelativeTo(null);//center the frame } }

    Read the article

  • Entity/Component based engine rendering separation from logic

    - by Denis Narushevich
    I noticed in Unity3D that each gameObject(entity) have its own renderer component, as far I understand, such component handle rendering logic. I wonder if it is a common practice in entity/component based engines, when single entity have renderer components and logic components such as position, behavior altogether in one box? Such approach sound odd to me, in my understanding entity itself belongs to logic part and shouldn't contain any render specific things inside. With such approach it is impossible to swap renderers, it would require to rewrite all that customized renderers. The way I would do it is, that entity would contain only logic specific components, like AI,transform,scripts plus reference to mesh, or sprite. Then some entity with Camera component would store all references to object that is visible to the camera. And in order to render all that stuff I would have to pass Camera reference to Renderer class and render all sprites,meshes of visible entities. Is such approach somehow wrong?

    Read the article

  • Using Managed Beans with your ADF Mobile Client Applications

    - by [email protected]
    Did you know it's easy to extend your ADF Mobile Client application with a Managed Bean just like it is with an ADF web application?  Here's how: Using the New Gallery (File -> New), create a new Java class.  This class should extend oracle.adfnmc.el.utils.BeanResolver.         Add this java class as a managed bean: Go to your task flow, select the Overview tab at the bottom and go to the Managed Bean section.  Add an entry and name your new Managed Bean and point to the java class you just created.        Add your custom methods and properties to your java class   Since reflection is not supported in the J2ME version on some platforms (BlackBerry), you need to provide dispatch code if you want to invoke/access any of your methods/properties from EL.  Here's a sample:  MyBeanClass.java    Use Expression Language (EL) to access your properties and invoke your methods on your MCX pages.  Here's an sample:     <?xml version="1.0" encoding="UTF-8" ?><amc:view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"          xmlns:amc="http://xmlns.oracle.com/jdev/amc">  <amc:form id="form0">    <amc:menuControl refId="menu0"/>    <amc:panelGroupLayout id="panelGroupLayout1" width="100%">      <amc:panelGroupLayout id="panelGroupLayout2" layout="horizontal"                            width="100%">        <amc:image id="image1" source="logo_sm.png"/>        <amc:outputText value="Home" id="outputText1" verticalAlign="center"                        fontSize="20" fontWeight="bold"                        foregroundColor="#ff0000"/>      </amc:panelGroupLayout>      <amc:commandLink text="#{MyBean.property1}" id="commandLink1"                       actionListener="#{MyBean.doFoo}"                       foregroundColor="#0000ff" action="patientlist"/>    </amc:panelGroupLayout>  </amc:form>  <amc:menu type="main" id="menu0">    <amc:menuGroup id="menuGroup1">      <amc:commandMenuItem id="commandMenuItem1" action="exit" label="Exit"                           index="1" weight="0"/>    </amc:menuGroup>  </amc:menu></amc:view> 

    Read the article

  • ADF Mobile Client Developer Preview announced!

    - by [email protected]
    Today at the RIM WES conference, Ted Farrell, Chief Architect and SVP, announed the general availability of the ADF Mobile Client Developer Preview.  This is an extension to JDeveloper that allows developers to rapidly develop mobile applications that reside on the mobile device and access a local database and can be used while completely disconnected from the network with a data synchronization technology to get the data back to the server.  You can quickly develop applications declaratively that run on multiple platforms without having to do native coding.  Go download JDeveloper at http://www.oracle.com/technology/software/products/jdev/index.html You can get more info about ADF Mobile Client here at:  http://www.oracle.com/technology/tech/wireless/adf_mobile.html   Check back here for coding examples and how-to's that will be posted regularly.

    Read the article

  • Installation automation

    - by Denis Gorbachev
    Use case: When I install Ubuntu on another computer, I need to: install all the packages that I use; make some config changes; svn checkout some projects; git clone some projects; setup .ssh/config; download a custom Eclipse build; download some additional Eclipse plugins; make many other tweaks. So, I want to run a script, like sudo install-everything-needed, that would execute these predefined actions. Is there any package that provides the backbone for such system?

    Read the article

  • A bounce-rate attack to manipulate SEO ?

    - by Denis Volovik
    This is a question to experienced people that might help us shed some light on the issue. We noticed a very strange behavior on our site, in Google Analytics. Some dude from Finland, namely, from Kouvola city is hitting one of our pages - only one page on our site, 'bout a hundred times per day, all with an average bounce rate of 90%+... This is causing our overall bounce rate to go up by 1 to 3% per day... which is very disturbing.. since we're trying to do our best in order to keep it as low as possible. And obviously having it jumped from ~24% to 27%, just because of that crazy dude is not making us happy at all... We tried implementing a geo-targeted script in order to catch this particular visitor and deliver him a juicy message, and it seemed like it helped in the beginning, it has stopped for a day or two, but now he's back... The geo-targeted script was also logging all IP addresses for page requests originating from Finland in order to find out more details and (in order to block them on the server level, later).. but thing is, it was all mainly cable or DSL connections with various, but not constantly repeating IPs... we are all wondering what is he up to really ? I think that this page should be kept updated with ideas on how to combat this and perhaps someone could also shed light on what it might be ? What is the reason for doing this "bounce-rate attack", as I call it? There was a similar question asked on stackoverflow earlier, with no meaningful answer - here - How to stop bounce rate manipulation.

    Read the article

  • How to find the Fastest DNS servers to host our domain?

    - by Denis Volovik
    The question was born because lately we've seen a pretty odd (well, at least for us, for the first time) - error message in Google webmaster tools - "DNS lookup timeout" ... I was pretty sure that with eNom's 5 DNS servers (dns1... to dns5.name-services.com) we're pretty set... But it appears that from (Europe/Hungary), for example - dns1.name-services.com takes 170ms. to respond on a ping... while GoDaddy's ns75.domaincontrol.com - takes only 40 ms. to respond... and at the same time - dns2 to dns5.name-services.com - each result with a timeout error (on ping)... This issue came to our attention right in the final stages of optimizing our web-site (almost to death) - basically, just in time... I would love to move our domains to a fast (fastest?) and reliable DNS server.. - but how do I find one ? Also - I did the ping tests from various geographic locations (we have servers in many countries) and GoDaddy seemed to be faster than eNom almost in every case. I'd be very thankful for any hints on this! Edited: Well.. maybe this one does not have an answer, after all...

    Read the article

  • Programmatically navigate to a new page

    - by [email protected]
    Did you know you can programmatically navigate to a new page via code?  Inside your bean method, you can simply use the NavigationDispatchHelper class to do the work for you. The invokePageNavigation method of NavigationDispatchHelper takes a String parameter that holds the value of the navigation rule to follow.   import oracle.adfnmc.util.NavigationDispatchHelper; public void MyBeanMethod() { /'/ Do stuff NavigationDispatchHelper.invokePageNavigation("patients"); }

    Read the article

  • Smoothing found path on grid

    - by Denis Ermolin
    I implemented several approaches such as A* and Potential fields for my tower defense game. But I want smooth paths, first I tried to find path on very small grid ( 5x5 pixels per tile) but it is extremly slow. I found nice video showing an RTS demo where paths are found on big grid but units dont move from each cell's center to center. How do I implement such behavior? Some examples would be great.

    Read the article

  • Illumination and Shading for computer graphics class

    - by Sam I Am
    I am preparing for my test tomorrow and this is one of the practice questions. I solved it partially but I am confused with the rest. Here is the problem: Consider a gray world with no ambient and specular lighting ( only diffuse lighting). The screen coordinates of a triangle P1,P2,P3, are P1=(100,100), P2= (300,150), P3 = (200, 200). The gray values at P!,P2,P3 are 1/2, 3/4, and 1/4 respectively. The light is at infinity and its direction and gray color are (1,1,1) and 1.0 respectively. The coefficients of diffused reflection is 1/2. The normals of P1,P2,P3 are N1= (0,0,1), N2 = (1,0,0), and N3 = (0,1,0) respectively. Consider the coordinates of three points P1,P2,P3 to be 0. Do not normalize the normals. I have computed that the illumination at the 3 vertices P1,P2,P3 is (1/4,3/8,1/8). Also I computed that interpolation coefficients of a point P inside the triangle whose coordinates are (220, 160) are given by (1/5,2/5,2/5). Now I have 4 more questions regarding this problem. 1) The illumination at P using Gouraud Shading is: i) 1/2 The answer is 1/2, but I have no idea how to compute it.. 2) The interpolated normal at P is given by i) (2/5, 2/5,1/5) ii) (1/2, 1/4, 1/4) iii) (3/5, 1/5, 1/5) 3) The interpolated color at P is given by: i) 1/2 Again, I know the correct answer but no idea how to solve it 4) The illumination at P using Phong Shading is i) 1/4 ii) 9/40 iii) 1/2

    Read the article

  • DOT implementation

    - by Denis Ermolin
    I have some DOT(damage over time) implementation problems. My game runs on 30 FPS speed. Current implementation is: let's say hero cast spell which make 1 damage per second. So on every frame i do (pseudo code): damage_done = getRandomDamage() * delta_time; I accumulate damage and when it becomes more then 0 then subtract rounded damage from current health and so on. With 30 FPS and 1 DPS it will be 1/33 = 0.05... We know that floats a not precise enough to sum 30 circulating decimals and have exact 1 in the end. But HP is discrete value and that's why 1 DPS will not have 1 damage after 1 second because value will be 0.9999..... It's not so big deal when you have 100000 DPS - +/- 1 damage will not be noticeable. But if i have 1, 5 DPS? How modern RPG's implemented DOT's?

    Read the article

  • Changing website Url - Am I making an SEO mistake

    - by Denis
    I have a webiste with a .com domain that is a year old. The business is a shop based in Ireland and I have purchased a .ie domain. I plan to move the website over to the new domain, SEO Good or Bad idea? Old Url - SmythsOfTerenure.com | New Url - SmythsComputerRepair.ie (I am using Fake names and fictional business in the example Url's) The new domain has my main keyword in it. The old domain has my family name and business location (city district) It currently ranks high for lots of relevant keywords in Google with low traffic and low competition. Current website traffic is about 80 session per week. 80% of that traffic is Organic from Google. I am changing domain in an attempt to help SEO long term by having a CC TLD (.ie rather than .com) and having my main Keyword in the domain. I plan to do 301 re-directs from old to new and update GW Tools and G Analytics but am I making a mistake changing it at all as I know rankings may fall in the sort term. Homepage PR=0 and very few inbound links. Should I just leave it on the old domain? Or after a few months should I be back up ranking as well as I am now?

    Read the article

  • Web Services Example - Part 2: Programmatic

    - by Denis T
    In this edition of the ADF Mobile blog we'll tackle part 2 of our Web Service examples.  In this posting we'll take a look at using a SOAP Web Service but calling it programmatically in code and parsing the return into a bean. Getting the sample code: Just click here to download a zip of the entire project.  You can unzip it and load it into JDeveloper and deploy it either to iOS or Android.  Please follow the previous blog posts if you need help getting JDeveloper or ADF Mobile installed.  Note: This is a different workspace than WS-Part1 Defining our Web Service: Just like our first installment, we are using the same public weather forecast web service provided free by CDYNE Corporation.  Sometimes this service goes down so please ensure you know it's up before reporting this example isn't working. We're going to concentrate on the same two web service methods, GetCityForecastByZIP and GetWeatherInformation. Defing the Application: The application setup is identical to the Weather1 version.  There are some improvements to the data that is displayed as part of this example though.  Now we are able to show the associated image along with each forecast line when using the Forecast By Zip feature.  We've also added the temperature Hi/Low values into the UI. Summary of Fundamental Changes In This Application The most fundamental change is that we're binding the UI to the Bean Data Controls instead of directly to the Web Service Data Controls.  This gives us much more flexibility to control the shape of the data and allows us to do caching of the data outside of the Web Service.  This way if your application is, say offline, your bean could still populate with data from a local cache and still show you some UI as opposed to completely failing because you don't have any connectivity. In general we promote this type of programming technique with ADF Mobile to insulate your application from any issues with network connectivity. What's different with this example? We have setup the Web Service DC the same way but now we have managed beans to process the data.  The following classes define the "Model" of our application:  CityInformation-CityForecast-Forecast, WeatherInformation-WeatherDescription.  We use WeatherBean for UI interaction to the model layer.  If you look through this example, we don't really do that much with the java code except use it to grab the image URL from the weather description.  In a more realistic example, you might be using some JDBC classes to persist the data to a local database. To have a good architecture it is always good to keep your model and UI layers separate.  This gets muddied if you start to use bindings on a page invoked from Java code and this java code starts to become your "model" layer.  Since bindings are page specific, your model layer starts to become entwined with your UI.  Not good!  To help with this, we've added some utility functions that let you invoke DC methods without having a binding and thus execute methods from your "model" layer without requiring a binding in your page definition.  We do this with the invokeDataControlMethod of the AdfmfJavaUtilities class.  An example of this method call is available in line 95 of WeatherInformation.java and line 93 of CityInformation.Java. What's a GenericType? Because Web Service Data Controls (and also URL Data Controls AKA REST) use generic name/value pairs to define their structure and don't have strongly typed objects, these are actually stored internally as GenericType objects.  The GenericType class is simply a property map of name/value pairs that can be hierarchical.  There are methods like getAttribute where you supply the index of the attribute or it's string property name.  Why is this important to know?  Because invokeDataControlMethod returns GenericType objects and developers either need to parse these GenericType objects themselves or use one of our helper functions. GenericTypeBeanSerializationHelper This class does exactly what it's name implies.  It's a helper class for developers to aid in serialization of GenericTypes to/from java objects.  This is extremely handy if you have a large GenericType object with many attributes (or you're just lazy like me!) and you just want to parse it out into a real java object you can use more easily.  Here you would use the fromGenericType method.  This method takes the class of the Java object you wish to return and the GenericType as parameters.  The method then parses through each attribute in the GenericType and uses reflection to set that same attribute in the Java class.  Then the method returns that new object of the class you specified.  This is obviously very handy to avoid a lot of shuffling code between GenericType and your own Java classes.  The reverse method, toGenericType is also available when you want to go the other way.  In this case you supply the string that represents the package location in the DataControl definition (Example: "MyDC.myParams.MyCollection") and then pass in the Java object you have that holds the data and a GenericType is returned to you.  Again, it will use reflection to calculate the attributes that match between the java class and the GenericType and call the getters/setters on those. Issues and Possible Improvements: In the next installment we'll show you how to make your web service calls asynchronously so your UI will fill dynamically when the service call returns but in the meantime you show the data you have locally in your bean fed from some local cache.  This gives your users instant delivery of some data while you fetch other data in the background.

    Read the article

  • Lag compensation of projectile shooting game

    - by Denis Ermolin
    I'm thinking about an algorithm for firing projectiles with lag compensation. Now I did find only one descent solution: Player hits fire button. Client sends input "fire". Client waits for server response. Server generates bullet then sends response to client. Client recieves response and finally fires projectile. Is this solution only "trueway"? I find it the only one that can be fair to all of the clients. Valve in this case, doesn't compensate lag from rocket shots. I am feeling that I will not compensate it, too. I think that with today's bandwidth I can close my eyes on this problem, because I don't see any solutions with fair logic. What do you think?

    Read the article

  • Cursor seems to freeze in the first attempt of typing - Unity 3D, 12.04

    - by Denis
    It happens in the first attempt of typing, no matter is after the startup, or 5 minutes later, or then after. The cursor (or maybe it's the system) seems to freeze, no matter the application I use, taking up 5 sec to appear what is typed. Subsequently, everything is normal, using another applications. @Anwar Shah suggested it could be a daemon waiting to run before the lauching of the first application. Turning off Zeitgest didn't help. It occurs only with Unity-3d. Tested with Unity-2d, everything is fine. Tried to change some Compiz settings, nothing worked, although not tested with every single parameter. Also I deactivated Ati proprietary driver, no effect. My system: AMD E350 1.6Gh, 2G-Ram, ATI graphics - Ubuntu 12.04, 64bits. Update 1: the cursor is blinking normally before I start typing. After the first character (which is not showed), seems to freeze, taking 5 seconds to get normal again. Very annoying, specially when you want to access login sites. Update 2: I tested on a different and old machine (Athlon 64 4800 x2, 4Gb ram, no problems - takes 2 seconds, acceptable. I think it could be related to my specific hardware (Samsung RV415), but not sure about it. Anyone experiencing something similar? Is that what I should expect, or can be fixed or improved? Thanks.

    Read the article

  • 2D scene graph not transforming relative to parent

    - by Dr.Denis McCracleJizz
    I am currently in the process of coding my own 2D Scene graph, which is basically a port of flash's render engine. The problem I have right now is my rendering doesn't seem to be working properly. This code creates the localTransform property for each DisplayObject. Matrix m_transform = Matrix.CreateRotationZ(rotation) * Matrix.CreateScale(scaleX, scaleY, 1) * Matrix.CreateTranslation(new Vector3(x, y, z)); This is my render code. float dRotation; Vector2 dPosition, dScale; Matrix transform; transform = this.localTransform; if (parent != null) transform = localTransform * parent.localTransform; DecomposeMatrix(ref transform, out dPosition, out dRotation, out dScale); spriteBatch.Draw(this.texture, dPosition, null, Color.White, dRotation, new Vector2(originX, originY), dScale, SpriteEffects.None, 0.0f); Here is the result when I try to add the Stage then to the stage a First DisplayObjectContainer and then a second one. It may look fine but the problem lies in the fact that I add a first DisplayObjectContainer at (400,400) and the second one within it (that's the smallest one) at position (0,0). So he should be right over its parent but he gets render within the parent at the same position the parent has (400, 400) for some reason. It's just as if I double the parent's localMatrix and then render the second cat there. This is the code i use to loop through every childs. base.Draw(spriteBatch); foreach (DisplayObject childs in _childs) { childs.Draw(spriteBatch); }

    Read the article

  • Web Services Example - Part 1: Declarative

    - by Denis T
    In this edition of the ADF Mobile blog we'll tackle part 1 of our Web Service examples. In this posting we'll take a look at using a declarative SOAP Web Service. Getting the sample code: Just click here to download a zip of the entire project. You can unzip it and load it into JDeveloper and deploy it either to iOS or Android. Please follow the previous blog posts if you need help getting JDeveloper or ADF Mobile installed. Defining our Web Service: First off, we should mention that this sample code is using a public web service provided free by CDYNE Corporation that provides weather forecasts by zipcode. Sometimes this service goes down so please ensure you know it's up before reporting this example isn't working. Let's take a look at the web service.  We created this by using the "Web Service Data Control" from the New Gallery and using this link to this wsdl:  "http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL"   This web service has several methods but we're interested in GetCityForecastByZIP which takes a single string parameter for the zipcode and the second method, GetWeatherInformation that enumerates all possible forecast descriptions and associated image URLs.  The latter we'll use in the next edition but we included it here for completeness. Defing the Application: After adding a feature to the adfmf-feature.xml file, we added a taskflow to host the application flow.  This comprises of a home screen with a list with items for each method in the web service, "Forecast by Zip" and "Weather Info".  In this application we've also decided to hide the navigation bar since there is only one feature in the application. Forecast by Zip: The "Forecast By ZIP" option first presents the user with a screen where they can enter a zipcode and when the "Search" button is tapped, it executes the GetCityForecastByZIP method.  This is done by binding an Action binding to that method. The easiest way to accomplish this is to just drag & drop the method from the Data Control palette to the AMX page and drop it as a button and let the framework hook it up for you.  There is an inputText component on the page that is bound to a pageFlowScope variable called "zip".  This is used as the parameter to the Action binding when it is executed.  Because the actionListener attribute of the commandButton executes the Web Service each time, we ensure that the method is invoked every time the button is clicked. Weather Info: Unlike the previous method, this time instead of explictly executing the web service method we are using deferred invocation.  What this means is that we will bind to the results of the method and the framework will execute the method when it the data is required to be rendered.  We do this by simply doing a drag & drop of the results of the GetWeatherInformation to the AMX page.  When the page is rendered and the bindings are resolved the framework invokes the method.  This executes the method only when it is needed and fills the Data Control provider.  Because we never re-execute the method, you can click from Home to Weather Info and back many times and the web service is only ever invoked once. Issues and Possible Improvements: One thing you will quickly realize with this example is that the error handling is done by the framework for you. For simple examples this is fine but for real applications you'll want to customize these error messages.  With the declarative invocation of web services, this is difficult.  This is one aspect we'll address in the second installment of the web service examples where we will show you how to do programmatic invocation which allows you better error handling. Another issue you will notice with this example is that we can enumerate the weather information but there isn't an easy way to use that information to show the corresponding description and image as part of the forecast results.  We'll show you how to do this in the next example.

    Read the article

  • Cursor seems to freeze in the first attempt to type - Unity 3D, 12.04

    - by Denis
    It happens in the first attempt of typing, no matter is after the startup, or 5 minutes later, or then after. The cursor (or maybe it's the system) seems to freeze, no matter the application I use, taking up 4 to 5 sec to appear what is typed. Subsequently, everything is normal, using another applications. @Anwar Shah suggested it could be a daemon waiting to run before the lauching of the first application. Turning off Zeitgest didn't help. It occurs only with Unity-3d. Tested with Unity-2d, everything is fine. Tried to change some Compiz settings, nothing worked, although not tested with every single parameter. Also I deactivated Ati proprietary driver, no effect. My system: AMD E350 1.6Gh, 2G-Ram, ATI graphics - Ubuntu 12.04, 64bits. Is that what I should expect, or can be fixed or improved? Thanks.

    Read the article

  • Update problems due to "installation of packages from not authenticated sources" error

    - by Denis Hoss
    I have some problems updating my Ubuntu Requires installation of untrusted packages The action would require the installation of packages from not authenticated sources. cinnamon gir1.2-muffin-3.0 libgnome-keyring-common libgnome-keyring0 libmuffin0 muffin-common The downloads are from the Main server, the Source code under Ubuntu Software tab is marked Is there something I have missed? The output of sudo apt-get update is: W: GPG error: http://ppa.launchpad.net oneiric Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6A9653F936FD5529 W: GPG error: http://ppa.launchpad.net oneiric Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A777609328949509 W: Duplicate sources.list entry http://archive.canonical.com/ubuntu/ oneiric/partner i386 Packages (/var/lib/apt/lists/archive.canonical.com_ubuntu_dists_oneiric_partner_binary-i386_Packages)

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >