Search Results

Search found 12404 results on 497 pages for 'native types'.

Page 18/497 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Traverse tree with results. Maybe type in Java?

    - by Angelo.Hannes
    I need to check a tree's node state. It can either be OK or NOT_OK. But that state is dependent on its children. So for a node to be OK, every of its children needs to be OK. If one or more of its children is NOT_OK the whole node is NOT_OK. To determine the state of a node I need to aggregate some properties of the node. So I thought of two possible implementations. And they are more or less covered in this question: Why is Option/Maybe considered a good idea and checked exceptions are not? Exception I could pass the properties up the recursion path, and throw an exception if something went wrong. Maybe I implement an Maybe type and let it either hold an error or the aggregated properties. Maybe it is more an Either. I tend towards the last option. And I'm thinking of an enum with two objects. Where I can additionally set those aggregated properties. Am I on the right track? I'm not familiar with the new JDK8 functional stuff. But I'm stuck on JDK7 anyway, so please focus on JDK7.

    Read the article

  • Make conversion to a native type explicit in C++

    - by Tal Pressman
    I'm trying to write a class that implements 64-bit ints for a compiler that doesn't support long long, to be used in existing code. Basically, I should be able to have a typedef somewhere that selects whether I want to use long long or my class, and everything else should compile and work. So, I obviously need conversion constructors from int, long, etc., and the respective conversion operators (casts) to those types. This seems to cause errors with arithmetic operators. With native types, the compiler "knows" that when operator*(int, char) is called, it should promote the char to int and call operator*(int, int) (rather than casting the int to char, for example). In my case it gets confused between the various built-in operators and the ones I created. It seems to me like if I could flag the conversion operators as explicit somehow, that it would solve the issue, but as far as I can tell the explicit keyword is only for constructors (and I can't make constructors for built-in types). So is there any way of marking the casts as explicit? Or am I barking up the wrong tree here and there's another way of solving this? Or maybe I'm just doing something else wrong...

    Read the article

  • Bad http connection (400) from Simple Native Iphone App to test .net Web Service

    - by leo
    Dear all, I have written a simple hello world .net web service which will accept 2 parameters and return the parameters as a string. The web service is hosted by IIS on a windows xp pc. I am able to access the web service using safari on the iphone simulator, successfully tested the operation using HTTP POST by clicking the "invoke" button. However, when I use the native app on the iphone simulator, I keep getting a bad http connection error 400 on the IIS log. I have tested my native app with http://viium.com/WebService/HelloWorld.asmx and it works. I have already added Does anyone know what is wrong? Is it some settings that have not configured correctly? Thank you very much in advance.

    Read the article

  • iPhone native app + payment gateway

    - by pratik
    Hello, I want to implement payment gateway for iPhone native app. I have read in few of the sites that I can integrate apple payment gateway for this through In App Purchase. But if I want to do through In App Purchase then, I have register each of my product with AppStore and set a price margin for each. Rather I am building something like shopping cart where prices of products are different. Please guide how should I proceed, is there any other payment gateway that I can integrate with my iPhone native app. Regards, Pratik

    Read the article

  • How to package AIR 2 native installer?

    - by John Isaacks
    I have made an AIR 2.0 app that uses NativeProcess so it needs to be packaged as a native installer (.exe) rather than a .air file. I first tried using Package Assistant but I kept getting an error telling me it cannot load keystore file. so I tried using the command line I use: pathToAirSDK>adt -args but I get an error telling me that "adt" is not a known command so I try: pathToAirSDK>adt.jar -args but I get a pop up telling me windows does not know how to open adt.jar files. Has anyone packaged a native installer for an AIR 2.0 app? How did you do it? edit forgot to mention I am doing this in windows using the windows command line.

    Read the article

  • Stop native web app from reloading itself upon opening on iOS

    - by cguedel
    I'm trying to build a "native web app" using HTML + JS on iOS. As you may know you can add such an application to the homescreen and it will more or less look just like a normal native app. However if I quit such an app and reopen it again it reloads the whole page again. This also happens when switching to such an application from another over the multitasking bar. Is this expected behaviour or is there a way to stop the device from doing this? As an example you can add the jqTouch-Demos from here to your homescreen and test it: http://jqtouch.com/preview/demos/main/

    Read the article

  • Will html5 and Javascript replace native applications?

    - by nimo
    I recently attended a conference on future of the web and web development and it was a lot of focus on HTML5 and how it will impact the way we look at the web and how we will use it. The majority of the speakers meant that it will replace native application on your desktop as well as in your mobile phone. I agree that you will be able to make a lot of great stuff with the new technology take bespin for example and the <video> and <canvas> tag will be amazing, but will it completely remove the need for native applications? Is there something you cannot do with Javascript and HTML5?

    Read the article

  • Ngen or compile to native code is better

    - by Raghav55
    I want to know which is one better native code generated is NGen.exe is better or run time conversion of IL to native code by JIT ? using System; public class Vehicle { public Vehicle() { } public string Name { get; set; } public string Model { get; set; } } class Program { static void Main(string[] args) { Vehicle aVech = new Vehicle(); aVech.Name = "BUS"; aVech.Model = "1980"; } }

    Read the article

  • [PyQt4] QFileDialog problem (native: fast but no input field; non-native: has input field but slow)

    - by Bing Jian
    Hi, This seems a known problem but I have not found a good workaround. I like the style of the non-native QFileDialog, especially the feature that allows the user to input the path directly which is very convenient since the user can easily copy/paste the folder/file name from other applications. However, it seems very slow when the dialog is first launched. The native option is quite responsive but the problem is that it does not provide an input field so for the user to select a folder he/she has to walk into the directory, which can take many mouse clicks and is not fun. I am not sure if you have experienced similar problem or if I miss something. BTW, my PyQt version is 4.4.3 and I am working on Windows XP. Thanks, Bing

    Read the article

  • Uninitialized constant Item::Types

    - by Rasmus
    Hi! First of, im a newbie ruby programmer so please bare with me if this is a very dumb question. I get this uninitialized constant error when i submit my nested forms. order.rb class Order < ActiveRecord::Base has_many :items, :dependent => :destroy has_many :types, :through => :items accepts_nested_attributes_for :items accepts_nested_attributes_for :types validates_associated :items validates_associated :types end item.rb class Item < ActiveRecord::Base has_one :types belongs_to :order accepts_nested_attributes_for :types validates_associated :types end type.rb class Type < ActiveRecord::Base belongs_to :items belongs_to :orders end new.erb.html <% form_for @order do |f| %> <%= f.error_messages %> <% f.fields_for :items do |builder| %> <table border="0"> <th>Type</th> <th>Amount</th> <th>Text</th> <th>Price</th> <tr> <% f.fields_for :type do |m| %> <td> <%= m.collection_select :type, Type.find(:all, :order => "created_at DESC"), :id, :name, {:prompt => "Select a Type" }, {:id => "selector", :onchange => "type_change(this)"} %> </td> <% end %> <td> <%= f.text_field :amount, :id => "amountField", :onchange => "change_total_price()" %> </td> <td> <%= f.text_field :text, :id => "textField" %> </td> <td> <%= f.text_field :price, :class => "priceField", :onChange => "change_total_price()" %> </td> <td> <%= link_to_remove_fields "Remove Item", f %> </td> </tr> </table> <% end %> <p><%= link_to_add_fields "Add Item", f, :items %></p> <p> <%= f.label :total_price %><br /> <%= f.text_field :total_price, :class => "priceField", :id => "totalPrice" %> </p> <p><%= f.submit "Create"%></p> <% end %> <%= link_to 'Back', orders_path %> create method in orders_controller.rb def create @order = Order.new(params[:order]) respond_to do |format| if @order.save flash[:notice] = 'Post was successfully created.' format.html { redirect_to(@order) } format.xml { render :xml => @order, :status => :created, :location => @order } else format.html { render :action => "new" } format.xml { render :xml => @order.errors, :status => :unprocessable_entity } end end end Hopefully you can see what i cant

    Read the article

  • Returning different data types C#

    - by user1810659
    i have create a class library (DLL) with many different methods. and the return different types of data(string string[] double double[]). Therefore i have created one class i called CustomDataType for all the methods containing different data types so each method in the Library can return object of the custom class and this way be able to return multiple data types I have done it like this: public class CustomDataType { public double Value; public string Timestamp; public string Description; public string Unit; // special for GetparamterInfo public string OpcItemUrl; public string Source; public double Gain; public double Offset; public string ParameterName; public int ParameterID; public double[] arrayOfValue; public string[] arrayOfTimestamp; // public string[] arrayOfParameterName; public string[] arrayOfUnit; public string[] arrayOfDescription; public int[] arrayOfParameterID; public string[] arrayOfItemUrl; public string[] arrayOfSource; public string[] arrayOfModBusRegister; public string[] arrayOfGain; public string[] arrayOfOffset; } The Library contains methods like these: public CustomDataType GetDeviceParameters(string deviceName) { ...................... code getDeviceParametersObj.arrayOfParameterName; return getDeviceParametersObj; } public CustomDataType GetMaxMin(string parameterName, string period, string maxMin) { .....................................code getMaxMingObj.Value = (double)reader["MaxMinValue"]; getMaxMingObj.Timestamp = reader["MeasurementDateTime"].ToString(); getMaxMingObj.Unit = reader["Unit"].ToString(); getMaxMingObj.Description = reader["Description"].ToString(); return getMaxMingObj; } public CustomDataType GetSelectedMaxMinData(string[] parameterName, string period, string mode) {................................code selectedMaxMinObj.arrayOfValue = MaxMinvalueList.ToArray(); selectedMaxMinObj.arrayOfTimestamp = MaxMintimeStampList.ToArray(); selectedMaxMinObj.arrayOfDescription = MaxMindescriptionList.ToArray(); selectedMaxMinObj.arrayOfUnit = MaxMinunitList.ToArray(); return selectedMaxMinObj; } As illustrated thi different methods returns different data types,and it works fine for me but when i import the DLL and want to use the methods Visual studio shwos all the data types in the CustomDataType class as suggestion for all the methods even though the return different data.This is illusrtated in the picture below. As we can see from the picture with the suggestion of all the different return data the user can get confused and choose wrong return data for some of the methods. So my question is how can i improve this. so Visual studio suggest just the belonging return data type for each method.

    Read the article

  • Oracle on NFS vmdk beats native NFS!?

    - by fletch00
    Hi, my colleagues are pursuing this with Netapp and Oracle - but I thought I'd post here on the off chance someone else has seen this We have a RedHat 5 VM (fully up2date) running Oracle 11i with data disks mounted via the VM's linux kernel NFS using Oracle's recommended mount options and the performance is very inconsistent (Querys that should take < 2 seconds sometimes take 60 seconds) Funny thing is we can run the same queries perfectly consistently < 2 seconds on a VMDK residing on SAME NetApp NFS datastore! Makes me wish Oracle and NetApp collaborated as closely as VMware and NetApp did on the Virtual Storage Console we used to perfectly set the NFS options and keep them in compliance... We have tried a few Linux NFS options others have posted and not seen improvement so far. We are now creating VMDK's for the VM to replace the Linux NFS mounted and workaround the issue as our developers need consistent performance ASAP.

    Read the article

  • Gmail notification in Ubuntu's native mail icon.

    - by D Connors
    So, new Ubuntu 10.04 up and running. Playing with the interface eventually got me curious about something. Up until now, I've only used the chat and broadcasting functionalities of the mail icon in Ubuntu's top panel, mostly because I take care of my mail on firefox so I don't need one more program (empathy) running on my poor little netbook. I'm currenty using gnome-gmail to set gmail as my default mail client in Ubuntu. But, when I click on the "Set up mail" item, inside the Panel's Mail icon, it simply brings up empathy. My question is: Is it possible (in any way whatsoever) to have my gmail notifications up there, configured so that clicking it will just take me to a gmail tab in Firefox? (instead of opening up empathy) This is really just some frivolous interest of mine, nothing important. Right now I'm using check-gmail to notify me of new mail, but the panel is really cramped up on my netbook, so it'd be nice to free up some room by getting rid of check-gmail and only using Ubuntu's mail icon. Ok, hope I was clear enough.

    Read the article

  • Looking for zsh completion file for osX native commands

    - by Chiggsy
    I've been digging deep into what actually comes with osX in /usr/bin and especially /usr/libexec. Quite good stuff really, although the command syntax is a bit.. odd. Let me direct the curious to the command that made me think of this: networksetup -printcommands I can not think of a command that better illustrates the need for good completion. security -h perhaps, but those commands have a familiar easy-to-read format. I beseech the community, please point me to a place where I can find such a thing. I never type them right, and I ache for tab completion for this Anyone have any idea where I could grab something? I'd prefer to stand on the shoulders of giants instead of trying to make a zsh/bash completion script leap into the world, ready for battle, like Athena, from my forehead. I am no Zeus when it comes to compctl. Not at all.

    Read the article

  • Mod_security questions and on User-Agent types

    - by Tiffany Walker
    Very new to mod_sec I want to block a UA string and I noticed there are a few types: SecRule HTTP_User-Agent SecRule REQUEST_HEADERS:User-Agent What is the real difference between them? My block: SecRule REQUEST_HEADERS:User-Agent "perl" "phase:2,pass,msg:'Perl based user agent identified'" Do I need to set a SecDefaultAction phase:2,deny,status:403,log,auditlog before that? Then any SecRule below that follows that action right?

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >