Search Results

Search found 47805 results on 1913 pages for 'return address'.

Page 73/1913 | < Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >

  • java - call web service operation - wrong return type

    - by user1639680
    i have a simple web service with one method that returns List<org.company.data.mp> i've created a simple web service client and specified a web service with wsdl. in netbeans i try to call a web service operation: right click, insert code, ... and i pick my web service operation. the code gets inserted but the method's return type is not List<org.company.data.mp> but it is List<org.company.server.mp>! i don't get it.. in the package "server" there is no class called mp! i check the implementation class of my web service - it says the return type is ...data.mp not ...server.mp

    Read the article

  • Processing a log to fix a malformed IP address ?.?.?.x

    - by skymook
    I would like to replace the first character 'x' with the number '7' on every line of a log file using a shell script. Example of the log file: 216.129.119.x [01/Mar/2010:00:25:20 +0100] "GET /etc/.... 74.131.77.x [01/Mar/2010:00:25:37 +0100] "GET /etc/.... 222.168.17.x [01/Mar/2010:00:27:10 +0100] "GET /etc/.... My humble beginnings... #!/bin/bash echo Starting script... cd /Users/me/logs/ gzip -d /Users/me/logs/access.log.gz echo Files unzipped... echo I'm totally lost here to process the log file and save it back to hd... exit 0 Why is the log file IP malformed like this? My web provider (1and1) has decide not to store IP address, so they have replaced the last number with the character 'x'. They told me it was a new requirement by 'law'. I personally think that is bs, but that would take us off topic. I want to process these log files with AWstats, so I need an IP address that is not malformed. I want to replace the x with a 7, like so: 216.129.119.7 [01/Mar/2010:00:25:20 +0100] "GET /etc/.... 74.131.77.7 [01/Mar/2010:00:25:37 +0100] "GET /etc/.... 222.168.17.7 [01/Mar/2010:00:27:10 +0100] "GET /etc/.... Not perfect I know, but least I can process the files, and I can still gain a lot of useful information like country, number of visitors, etc. The log files are 200MB each, so I thought that a shell script is the way to go because I can do that rapidly on my Macbook Pro locally. Unfortunately, I know very little about shell scripting, and my javascript skills are not going to cut it this time. I appreciate your help.

    Read the article

  • Can MySQL Nested Select return list of results

    - by John
    Hi I want to write a mysql statement which will return a list of results from one table along with a comma separated list of field from another table. I think an example might better explain it Table 1 ======================== id First_Name Surname ---------------------- 1 Joe Bloggs 2 Mike Smith 3 Jane Doe Table 2 ======================== id Person_Id Job_id --------------------- 1 1 1 2 1 2 3 2 2 4 3 3 5 3 4 I want to return a list of people with a comma separated list of job_ids. So my result set would be id First_Name Surname job_id ------------------------------ 1 Joe Bloggs 1,2 2 Mike Smith 2 3 Jane Doe 3,4 I guess the sql would be something like select id, First_Name, Surname, (SELECT job_id FROM Table 2) as job_id from Table 1 but obviously this does not work so need to change the '(SELECT job_id FROM Table 2) as job_id' part. Hope this makes sense Thanks John

    Read the article

  • how do i return arraylist from a function?

    - by KoolKabin
    Hi guys, I learnt example from msdn to populate a listbox control with arraylist. http://msdn.microsoft.com/en-us/library/1818w7we(v=VS.100).aspx I want to create a function which will give return the USStates arraylist and use the returned value as datasource for listbox1 Dim USStates As New ArrayList() USStates.Add(New USState("Alabama", "AL")) USStates.Add(New USState("Washington", "WA")) USStates.Add(New USState("West Virginia", "WV")) USStates.Add(New USState("Wisconsin", "WI")) USStates.Add(New USState("Wyoming", "WY")) ListBox1.DataSource = USStates ListBox1.DisplayMember = "LongName" ListBox1.ValueMember = "ShortName I tried creating a function like: Public Shared Function FillList() As ArrayList() Dim USStates As New ArrayList() USStates.Add(New USState("Alabama", "AL")) USStates.Add(New USState("Washington", "WA")) USStates.Add(New USState("West Virginia", "WV")) USStates.Add(New USState("Wisconsin", "WI")) USStates.Add(New USState("Wyoming", "WY")) return usstates end function but it says error: Value of type 'System.Collections.ArrayList' cannot be converted to '1-dimensional array of System.Collections.ArrayList'.

    Read the article

  • How to return a dynamic value from a Mocha mock in Ruby

    - by Vivek
    The gist of my problem is as follows:- I'm writing a Mocha mock in Ruby for the method represented as "post_to_embassy" below. It is not really our concern, for the purpose of describing the problem, what the actual method does. But I need the mock to return a dynamic value. The proc '&prc' below is executing rightly in place of the actual method. But the "with" method in Mocha only allows for boolean values to be returned. So the code below outputs nil. I need it to output the value being passed through orderInfoXml. Does anyone know of an alternate method I can use? require 'rubygems' require 'mocha' include Mocha::API class EmbassyInterface def post_to_embassy(xml) puts "This is from the original class:-" puts xml return xml end end orderInfoXml = "I am THE XML" mock = EmbassyInterface.new prc = Proc.new do |orderXml| puts "This is from the mocked proc:-" puts orderXml orderXml end mock.stubs(:post_to_embassy).with(&prc) mock_result = mock.post_to_embassy(orderInfoXml) p mock_result #p prc.call("asd") output:- This is from the mocked proc:- I am THE XML nil

    Read the article

  • javascript return function's data as a file

    - by Dennis
    I have a function in javascript called "dumpData" which I call from a button on an html page as **onlick="dumpData(dbControl);"* What it does is return an xml file of the settings (to an alert box right now). I want to return it to the user as a file download. Is there a way to create a button when click will open a file download box and ask the user to save or open it? (sorta of like right-clicking and save target as)... Or can it be sent to a php file and use export();? Not sure how I would send a long string like that to php and have it simple send it back as a file download. Dennis

    Read the article

  • casting unused return values to void

    - by markh44
    int fn(); void whatever() { (void) fn(); } Is there any reason for casting an unused return value to void, or am I right in thinking it's a complete waste of time? Follow up: Well that seems pretty comprehensive. I suppose it's better than commenting an unused return value since self documenting code is better than comments. Personally, I'll turn these warnings off since it's unnecessary noise. I'll eat my words if a bug escapes because of it...

    Read the article

  • Can't override "From" address in MailMessage class using .config login credentials

    - by Jeff
    I'm updating some existing code that sends a simple email using .Net's SMTP classes. Sample code is below. The SMTP host is google and login info is contained in the App.config as shown below (obviously not real login info :)). The problem I'm having, and I haven't been able to find any answers Googling, is that I can NOT override the display of the "from" email address that's contained in the "username" attribute off the Network element in the config in the delivered email. In the line below that explicitly sets the From property off the myMailMessage object, that value, "[email protected]" does NOT display when the email is received. It still shows as "[email protected]" from the Network tag. However, the From name "Sparky" does appear in the email. I've tried adding a custom "From" header to the Header property of the myMailMessage but that didn't work either. Is there anyway to login to the smtp server, as shown below using the Network tag credentials, but in the actual email received override the From email address that's displayed? Sample code: MailMessage myMailMessage = new MailMessage(); myMailMessage.Subject = "My New Mail"; myMailMessage.Body = "This is my test mail to check"; myMailMessage.From = new MailAddress("[email protected]", "Sparky"); myMailMessage.To.Add(new MailAddress("[email protected]", "receiver name")); SmtpClient mySmtpClient = new SmtpClient(); mySmtpClient.Send(myMailMessage); in App.config: <system.net> <mailSettings> <smtp deliveryMethod="Network" from="[email protected]"> <network host="smtp.gmail.com" port="587" userName="[email protected]" password="mypassword" defaultCredentials="false"/> </smtp> </mailSettings> </system.net>

    Read the article

  • check whether mmap'ed address is correct

    - by reddot
    I'm writing a high-loaded daemon that should be run on the FreeBSD 8.0 and on Linux as well. The main purpose of daemon is to pass files that are requested by their identifier. Identifier is converted into local filename/file size via request to db. And then I use sequential mmap() calls to pass file blocks with send(). However sometimes there are mismatch of filesize in db and filesize on filesystem (realsize < size in db). In this situation I've sent all real data blocks and when next data block is mapped -- mmap returns no errors, just usual address (I've checked errno variable also, it's equal to zero after mmap). And when daemon tries to send this block it gets Segmentation Fault. (This behaviour is guarantedly issued on FreeBSD 8.0 amd64) I was using safe check before open to ensure size with stat() call. However real life shows to me that segfault still can be raised in rare situtaions. So, my question is there a way to check whether pointer is accessible before dereferencing it? When I've opened core in gdb, gdb says that given address is out of bound. Probably there is another solution somebody can propose.

    Read the article

  • Doxygen - <X>:1: warning: return type of member X is not documented

    - by Matt Clarkson
    /*! \var GLOBAL_VAR * \brief This is my global initialisation array for MY_STRUCT */ MY_STRUCT GLOBAL_VAR = { 1, 3, 2, 1, }; I get the following error: <GLOBAL_VAR>:1: warning: return type of member GLOBAL_VAR is not documented But this shouldn't have any return type?! If I do either of the following the warning goes away: /*! \var GLOBAL_VAR * \brief This is my global initialisation array for MY_STRUCT * \returns */ MY_STRUCT GLOBAL_VAR = { 1, 3, 2, 1, }; Or: /*! \var GLOBAL_VAR * \brief This is my global initialisation array for MY_STRUCT */ MY_STRUCT GLOBAL_VAR = 3; The isn't very useful as it puts a "Returns" into my HTML documentation and the second one breaks my code! How do I remove this warning? Thanks Matt

    Read the article

  • Return an empty IEnumerator

    - by Rekreativc
    Hello! I have an interface that, among other things, implements a "public IEnumerator GetEnumerator()" method, so I can use the interface in a foreach statement. I implement this interface in several classes and in one of them, I want to return an empty IEnumerator. Right now I do this the following way: public IEnumerator GetEnumerator() { ArrayList arr = new ArrayList(); return arr.GetEnumerator(); } However I consider this an ugly hack, and I can't help but think that there is a better way of returning an empty IEnumerator. Is there?

    Read the article

  • How to return 'null' instead of 'undefined' from select element

    - by MrW
    How can I return null instead of a 'undefined' from a select element. Basically I have 4 selects at the moment, but only the first one is populated with data at this point, but I want to grab the value from all of them when working with them. <select class="changeValue" id="drpOne"></select> <option id=1>1</option> <option id=2>2</option> <option id=3>3</option> <select class="changeValue" id="drpTwo"></select> JQuery: $('.changeValue').change(function() { var data = {}; data["Id1"] = $('#drpOne:selected').attr("id"); data["Id2"] = $('#drpTwo:selected').attr("id"); In this case, drpTwo will return 'undefined'. Is there anyway to get a null instead?

    Read the article

  • Nhibernate Exception - Return types of SQL query were not specified

    - by Muhammad Akhtar
    I am executing SQL in hibernate and getting exception Return types of SQL query were not specified public ArrayList get(string Release, int DocId) { string query = string.Format("select ti.Id, (' Defect ' + cast(ti.onTimeId as varchar) + ' - ' + ti.Name) as Name from TrackingItems ti inner join DocumentTrackingItems dti on ti.Id = dti.ItemStepId inner join Documents doc on dti.DocumentId = doc.Id where ti.ReleaseId = '{0}' AND doc.TypeId = {1} and Doc.Name is null AND ti.Type = 'Defect'", Release, DocId); ISession session = NHibernateHelper.GetCurrentSession(); ArrayList arList = (ArrayList)session.CreateSQLQuery(query).List(); return arList; } When I run this query in SQL, it working fine. any idea what could be the issue? -------- Thanks.........

    Read the article

  • nginx error: (99: Cannot assign requested address)

    - by k-g-f
    I am running Ubuntu Hardy 8.04 and nginx 0.7.65, and when I try starting my nginx server: $ sudo /etc/init.d/nginx start I get the following error: Starting nginx: [emerg]: bind() to IP failed (99: Cannot assign requested address) where "IP" is a placeholder for my IP address. Does anybody know why that error might be happening? This is running on EC2. My nginx.conf file looks like this: user www-data www-data; worker_processes 4; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; access_log /usr/local/nginx/logs/access.log; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 3; gzip on; gzip_comp_level 2; gzip_proxied any; gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript; include /usr/local/nginx/sites-enabled/*; } and my /usr/local/nginx/sites-enabled/example.com looks like: server { listen IP:80; server_name example.com; rewrite ^/(.*) https://example.com/$1 permanent; } server { listen IP:443 default ssl; ssl on; ssl_certificate /etc/ssl/certs/myssl.crt; ssl_certificate_key /etc/ssl/private/myssl.key; ssl_protocols SSLv3 TLSv1; ssl_ciphers ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP; server_name example.com; access_log /home/example/example.com/log/access.log; error_log /home/example/example.com/log/error.log; }

    Read the article

  • Different return XML in a WCF Operation

    - by Sean Hederman
    I am writing a service to a international HTTP standard, and there is one method that can return three different XML results, call them Single, Multiple and Error. Now I've written an IXmlSerializable class that can consume each of these results and generate them. However, WCF seems to insist that I can only have a single return XML root name. I have to choose an XmlRoot for my custom object of either Single, Multiple or Error. How can I set up WCF so that I can choose at runtime what the root will be? This is what I have currently. /// <summary> /// A collection of items. /// </summary> [XmlRoot("Multiple", Namespace = "DAV:")] public sealed class ItemCollection : IEnumerable<Item>, IXmlSerializable /// <summary> /// Processes and returns the items. /// </summary> [WebInvoke(Method = "POST", UriTemplate = "{*path}", BodyStyle = WebMessageBodyStyle.Bare)] [OperationContract] [XmlSerializerFormat] ItemCollection Process(string path);

    Read the article

  • properly format postal address with line breaks [google maps]

    - by munchybunch
    Using V3 of the google maps API, is there any reliable way to format addresses with the line break? By this, I mean something like 1600 Amphitheatre Parkway Mountain View, CA 94043 should be formatted as 1600 Amphitheatre Parkway Mountain View, CA 94043 Looking through the response object from geocoding, there is an address_components array that has, for the above address, 8 components (not all of the components are used for the address): 0: Object long_name: "1600" short_name: "1600" types: Array[1] 0: "street_number" length: 1 1: Object long_name: "Amphitheatre Pkwy" short_name: "Amphitheatre Pkwy" types: Array[1] 0: "route" length: 1 2: Object long_name: "Mountain View" short_name: "Mountain View" types: Array[2] 0: "locality" 1: "political" length: 2 3: Object long_name: "San Jose" short_name: "San Jose" types: Array[2] 0: "administrative_area_level_3" 1: "political" length: 2 4: Object long_name: "Santa Clara" short_name: "Santa Clara" types: Array[2] 0: "administrative_area_level_2" 1: "political" length: 2 5: Object long_name: "California" short_name: "CA" types: Array[2] 0: "administrative_area_level_1" 1: "political" length: 2 6: Object long_name: "United States" short_name: "US" types: Array[2] 0: "country" 1: "political" length: 2 7: Object long_name: "94043" short_name: "94043" types: Array[1] 0: "postal_code" length: 1 I was thinking that you could just combine parts that you want, like sprintf("%s %s<br />%s, %s %s", array[0].short_name, array[1].short_name, array[2].short_name, array[5].short_name, array[7].short_name) [edit]I just realized that sprintf isn't defined by default in JavaScript, so just a concatenation would do I guess.[/edit] But that seems awfully unreliable. Does anyone know the details on the structure of address_components, and if it's reliably similar like that for street addresses in the US? If I wanted to, I guess I could look for the proper types (street_number,route, etc) as well. I'd love it if anyone had a better way than what I"m doing here...

    Read the article

  • PostgreSQL - best way to return an array of key-value pairs

    - by Matt W
    I'm trying to select a number of fields, one of which needs to be an array with each element of the array containing two values. Each array item needs to contain a name (character varying) and an ID (numeric). I know how to return an array of single values (using the ARRAY keyword) but I'm unsure of how to return an array of an object which in itself contains two values. The query is something like SELECT t.field1, t.field2, ARRAY(--with each element containing two values i.e. {'TheName', 1 }) FROM MyTable t I read that one way to do this is by selecting the values into a type and then creating an array of that type. Problem is, the rest of the function is already returning a type (which means I would then have nested types - is that OK? If so, how would you read this data back in application code - i.e. with a .Net data provider like NPGSQL?) Any help is much appreciated.

    Read the article

  • Return back to the parent activity from subactivity

    - by ZelluX
    My application supports twitter and needs to open browser for OAuth. When the user clicks the Share on Twitter button, the main activity will create another subactivity (TwitterActivity) to handle twitter authentication issues. Here is a flow graph showing how activities are invoked currently. Main is short for MainActivity and Twit for TwitterActivity. startActivity() OAuth intent OAuth callback finish() Main ---------------> Twit ------------> Browser --------------> Twit --------> Browser As you may notice, after the TwitterActivity calls finish() to stop, it will now return back to MainActivity, but Browser instead. How can I make it return back to MainActivity? Many thanks

    Read the article

  • STDOUT can not return to Screen

    - by rockyurock
    STDOUT can not return to Screen Hello all below is the part of my code, my code enters "if loop" with $value =1 and output of the process "iperf.exe" is getting into my_output.txt. As i am timing out the process after alram(20sec) time,also wanted to capture the output of this process only. then after i want to continue to the command prompt but i am not able to return to the command promt... not only this code itself does not PRINT on the command prompt , rather it is priniting on the my_output.txt file (i am looping this if loop through rest of my code) output.txt ========== inside value loop2 ------------------------------------------------------------ Server listening on UDP port 5001 Receiving 1470 byte datagrams UDP buffer size: 8.00 KByte (default) ------------------------------------------------------------ [160] local 10.232.62.151 port 5001 connected with 10.232.62.151 port 1505 [ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams [160] 0.0- 5.0 sec 2.14 MBytes 3.59 Mbits/sec 0.000 ms 0/ 1528 (0%) inside value loop3 clue1 clue2 inside value loop4 one iperf completed Transfer Transfer Starting: Intent { act=android.settings.APN_SETTINGS } ******AUTOMATION COMPLETED****** Looks some problem with reinitializing the STDOUT.. even i tried to use close(STDOUT); but again it did not return to STDOUT could sombbody please help out ?? /rocky CODE:: if($value) { my $file = 'my_output.txt'; use Win32::Process; print"inside value loop\n"; # redirect stdout to a file open STDOUT, '>', $file or die "can't redirect STDOUT to <$file> $!"; Win32::Process::Create(my $ProcessObj, "iperf.exe", "iperf.exe -u -s -p 5001", 0, NORMAL_PRIORITY_CLASS, ".") || die ErrorReport(); $alarm_time = $IPERF_RUN_TIME+2; #20sec print"inside value loop2\n"; sleep $alarm_time; $ProcessObj->Kill(0); sub ErrorReport{ print Win32::FormatMessage( Win32::GetLastError() ); } print"inside value loop3\n"; print"clue1\n"; #close(STDOUT); print"clue2\n"; print"inside value loop4\n"; print"one iperf completed\n"; } my $data_file="my_output.txt"; open(ROCK, $data_file)|| die("Could not open file!"); @raw_data=<ROCK>; @COUNT_PS =split(/ /,$raw_data[7]); my $LOOP_COUNT_PS_4 = $COUNT_PS[9]; my $LOOP_COUNT_PS_5 = $COUNT_PS[10]; print "$LOOP_COUNT_PS_4\n"; print "$LOOP_COUNT_PS_5\n"; my $tput_value = "$LOOP_COUNT_PS_4"." $LOOP_COUNT_PS_5"; print "$tput_value"; close(ROCK); print FH1 "\n $count \| $tput_value \n"; regds rakesh

    Read the article

  • [WORDPRESS] Return highest term_taxonomy_id

    - by antosha
    Hi guys, I am trying to return the highest term taxonomy id of a post page or a taxonomy page. I was sucessful at listing all taxonomy id's like this: <?php $terms = get_the_terms( $post->ID , 'mytaxonomy' ); if($terms) { foreach( $terms as $term ) { echo $term->term_taxonomy_id; } } ?> This is what I am trying to do (return only the highest ID) (doesn't work): <?php $terms = get_the_terms( $post->ID , 'mytaxonomy' ); if($terms) { foreach( $terms as $term ) { echo max( '$term->term_taxonomy_id'); } } ?> Please help :)

    Read the article

< Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >