Search Results

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

Page 34/1913 | < Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >

  • [Objective-C] Primitive question, (void) init method.

    - by user354289
    Hi, I have a question in Objective-C. I'm using init method Apple recommended style. - (id)initMyClass: (int)a { if (self = [super init]) { // a... } return self; } Init method returns own object pointer. Then, if the object will not be refered from any objects, can empty return method(void) be better? - (void)initMyClass: (int)a { if ([super init] != nil) { // a... } } I want to know about that, if init method doesn't return self, what problem will occur?

    Read the article

  • mcrypt_decrypt return strange code

    - by Jin Yong
    I tried to encrypt an array then decrypt it back to string by calling a function, it's seem return the correct value if I does all encrypt and decrypt at once time in the function, however, if I return the encrypt value, then call the function again to decrypt it will return me some strange code. Exmaple: public main() { $dataArray = array("one"=>1, "two"=>2, "three"=>3); $a = $this->encryptDecryptInfo(json_encode($dataArray),$this->key); var_dump($a); } public function encryptDecryptInfo($text,$key) { $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, $text= base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_CFB, $iv)); return mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($text), MCRYPT_MODE_CFB, $iv); } This will return me the correct value which is string(27) "{"one":1,"two":2,"three":3}" Exmaple 2: public main() { $dataArray = array("one"=>1, "two"=>2, "three"=>3); $a = $this->encryptDecryptInfo(json_encode($dataArray),$this->key,"encrypt"); $b = $this->encryptDecryptInfo($a,$this->key,"decrypt"); var_dump($b); } public function encryptDecryptInfo($text,$key,$type) { $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CFB), MCRYPT_RAND); if($type == "encrypt") return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_CFB, $iv)); else return mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($text), MCRYPT_MODE_CFB, $iv); } However if I do my code in this way, it will return me strange value which is like this string(27) "?ÔérôŸY éXgíœÈÐN*é౜CµÖ" .Deos anyone know why this is happen?

    Read the article

  • Passing an address inside a WordPress post to a Google Map elsewhere on the Page

    - by ael_ecurai
    Background: My client is building their own WordPress site (using a purchased feature-rich theme), and I'm modifying a child theme as necessary to achieve customizations she wants. The theme comes with a Page template that includes a full-width Google Map across the top, which pulls its marker from a single address set within the Theme Options. It's meant to be used for one main "Contact Us" page. The client's business has several locations, and she wants each location's page to include such a map. (Example linked below.) It seems that the ideal solution would be the ability to specify an address within a shortcode in the Post, and have that set the map marker. Here's how the theme makes the map (where $mapAddress is the address from the Theme Options): <?php $mapAddress = ot_get_option( 'map_address' ); $mapHeight = ot_get_option( 'map_height' ); $mapContent = ot_get_option( 'map_content' ); ?> <section id="block-map-wrapper"> <div id="block-map" class="clearfix"> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=true"></script> <script> jQuery(document).ready(function(){ // Map Options var mapOptions = { zoom: 15, scrollwheel: false, zoomControl: true, zoomControlOptions: { style: google.maps.ZoomControlStyle.SMALL, position: google.maps.ControlPosition.TOP_LEFT }, mapTypeControl: true, scaleControl: false, panControl: false, mapTypeId: google.maps.MapTypeId.ROADMAP }; // The Map Object var map = new google.maps.Map(document.getElementById("map"), mapOptions); var address = ""; var geocoder = new google.maps.Geocoder(); geocoder.geocode({ "address" : "<?php echo $mapAddress; ?>" }, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { address = results[0].geometry.location; map.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({ position: address, map: map, clickable: true, animation: google.maps.Animation.DROP }); var infowindow = new google.maps.InfoWindow({ content: "<?php echo $mapContent; ?>" }); google.maps.event.addListener(marker, "click", function() { infowindow.open(map, marker); }); } }); }); </script> <div id="map" class = "map" style = "width: 100%; height: <?php echo $mapHeight; ?>px"></div> </div><!-- #block-map --> <div class="shadow-bottom"></div> </section><!-- #block-map-wrapper --> Here's a test page using a custom Page template I've created. Right now it's using the same map code as above. I've tried creating a shortcode that takes an address attribute and sets it as $mapAddress, but that didn't work. I believe it's because the map is already loaded by the time the Loop gets parsed. How can I tell Maps to "come back" to the post to get the proper address? My specialty lies in HTML & CSS, but Javascript befuddles me fairly easily, so please be explicit when explaining implementation. Bonus: A further goal is to have the locations' parent Page also include such a map, but have multiple markers representing the multiple locations. When taking more than one location, Google Maps only accepts latitude/longitude. I don't want my client to be concerned with coordinates, so I know there's got to be something I can do with the geocoding service so she can just input a list of addresses instead (into the same, or similar, shortcode solution developed for my main question). But I am extra-clueless about how to do that.

    Read the article

  • Which MAC address is the right one?

    - by Paul Dinh
    Result by 'getmac': C:\>getmac Physical Address Transport Name =================== ========================================================== 72-03-C6-48-59-34 \Device\Tcpip_{8AEB3263-18C4-449E-A80F-BC2541DDC2A9} 00-21-9B-D5-6F-EE \Device\Tcpip_{C2F9CE19-D68F-4105-9766-45CBE6D82331} 00-22-68-D2-9B-F7 \Device\Tcpip_{A2701130-9221-43FE-8F14-7B1114F84DC3} Result by 'ipconfig /all': C:\>ipconfig /all Windows IP Configuration Host Name . . . . . . . . . . . . : xps-m1530 Primary Dns Suffix . . . . . . . : Node Type . . . . . . . . . . . . : Mixed IP Routing Enabled. . . . . . . . : No WINS Proxy Enabled. . . . . . . . : No Ethernet adapter Wireless Network Connection: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Dell Wireless 1395 WLAN Mini-Card Physical Address. . . . . . . . . : 00-22-68-D2-9B-F7 Dhcp Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Autoconfiguration IP Address. . . : 169.254.246.4 Subnet Mask . . . . . . . . . . . : 255.255.0.0 Default Gateway . . . . . . . . . : Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Marvell Yukon 88E8040 PCI-E Fast Eth ernet Controller Physical Address. . . . . . . . . : 00-21-9B-D5-6F-EE Dhcp Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes IP Address. . . . . . . . . . . . : 192.168.1.112 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1 DHCP Server . . . . . . . . . . . : 192.168.1.1 DNS Servers . . . . . . . . . . . : 8.8.8.8 8.8.4.4 Lease Obtained. . . . . . . . . . : 01 November 2012 9:00:36 AM Lease Expires . . . . . . . . . . : 04 November 2012 9:00:36 AM There is a MAC address on the back of my laptop, but the sticker is no longer there. So I use the 'getmac' command to get the MAC addresses. But which address shown by 'getmac' above is the one matching the MAC in the sticker on the back of my laptop? Or am I mistaken something? 00-21-... is the ethernet adapter, 00-22-... is the wireless adapter, and 72-03-... is what?

    Read the article

  • How to remove line breaks (or carriage returns) only from certain parts of a block of text?

    - by Luke Allen
    Whenever I copy formatted text from a PDF file which is formatted to have line breaks (or carriage returns), I need to find a way to remove these line breaks without removing the paragraph format. To do this I need to use RegEx (Regular expressions) to only remove the line breaks which aren't preceded by a period. So for example, if a string of text has a line break right after a period, that is obviously almost always a legitimate line break which will start a new paragraph. If a string of text has a line break mid-word or after a word with no period, it's simply part of the bad formatting I need to get rid of. My problem is that I don't know how to use RegEx to make it only remove the ^p tags in word or CRLF or line breaks in any format under the conditions that it omits ones following a period.

    Read the article

  • How do you initialize networking on a new Xen guest VM?

    - by Marten Veldthuis
    We have a Citrix XenServer setup, and while I personally lean more towards Dev than Ops, I've got an issue that's been bugging me. When you provision a new (Linux/Ubuntu) guest, how do you get it to have the correct IP-address? I'd want my application servers to exist in the range of 10.20.0.0/24, preferably being .1, .2, etc, so I can keep my sanity. I guess that the actual IP-address is something set in Linux itself, and Xen can't touch that, but then what's the best practice for getting it done? If you set up DHCP, don't you just move the problem to getting the adapters the "correct" MAC-addresses? Do you just have to hardcode a large table of MAC-addresses to IP-addresses, and then provision new guests always with the correct MAC-address on the virtual ethernet adapter? What we currently do is have an image of a "app server" that we boot up a new instance of, and then finalize it (with a script) that (among other things) modifies the /etc/networking/interface file to give it the correct IP. But that feels dirty to me, and I feel like surely there must a better way. Please enlighten me?

    Read the article

  • Onboard Ethernet suddenly stopped working to router

    - by AfterschoolHobbist
    Hey guys, yesterday I have a sudden problem of my Ethernet connection to my router. My computer is a Pendium 4 with Window XP SP3 running on it and it was working fine earlier in the day, but yesterday night was the start of the problem. My computer is unable to ping to the router and to any other website and unable to get internet connection. As beside it was connected to a hub, I directly connected it to the router directly and the same problem occurred, being unable to ping to the router (and connecting to it) and still no internet access. My directly connected to the modem and the problem still persisted. For each connection, I connected it to my computer and my laptop and my laptop was able to connect, while my desktop computer was unable. I wondered if it was a OS issue and ran a live Ubuntu CD to see if Ubuntu was able to connect to the internet, but the issue persisted and I was unable to get internet access. I then set my router's lease time to 1 hour and waited. After 1 hour, the lease for my computer was removed and I hoped this worked, but it didn't work, but something strange is acting up. My desktop computer is still unable to ping to the router or connect to the internet, but for some reason, my router and desktop computer is still able to contact each other by providing a lease of an local ip address. The router record of a lease to my desktop computer, and when I do ipconfig, my desktop also recognize that it has been provided a local ip address. I have concluded that this is a hardware issue and the only solution to fix this is to by a network card adapter, but I am wondering if anyone has any solutions that could explain why this happen, why my mac address is 01-23-45-67-89-ab, and is there any way to fix it without buying a new network card? Thanks in advance.

    Read the article

  • Chained address rewrite

    - by kemp
    What I need to do is rewriting this address: (1) http://localhost/wordpress/fake/text-value to (2) http://localhost/wordpress/gallery?somevar=text-value Notes: the remapping must be transparent: the user always has to see address (1) gallery is a permalink to a wordpress page, not a real address I basically need to rewrite the address first (to modify it) and then feed it back to mod rewrite again (to let wordpress parse it its own way). Problems if I simply do RewriteRule ^fake$ http://localhost/wordpress/gallery [L] it works but the address in the browser changes, which is no good, if I do RewriteRule ^fake$ /wordpress/gallery [L] I get a 404. I tried different flags instead of [L] but to no avail. How can I get this to work?

    Read the article

  • how to read an address in multiple formats like google maps

    - by ratan
    notice that on google maps you can input the address any way you like. as long as it is a valid address...google maps will read it. In some ruby book I had seen code snippet for something like this, but with phone numbers. Any ideas how this could be done for addresses? in language of your choice. EDIT: i dont care about a "valid" address. I just want to parse an address. so that 123 fake street, WA, 34223 would be an address and so will 123 fake street WA 34223

    Read the article

  • Chained address rewrite in Wordpress

    - by kemp
    What I need to do is rewriting this address: (1) http://localhost/wordpress/fake/text-value to (2) http://localhost/wordpress/gallery?somevar=text-value Notes: the remapping must be transparent: the user always has to see address (1) gallery is a permalink to a wordpress page, not a real address I basically need to rewrite the address first (to modify it) and then feed it back to mod rewrite again (to let wordpress parse it its own way). Problems if I simply do RewriteRule ^fake$ http://localhost/wordpress/gallery [L] it works but the address in the browser changes, which is no good, if I do RewriteRule ^fake$ /wordpress/gallery [L] I get a 404. I tried different flags instead of [L] but to no avail. How can I get this to work?

    Read the article

  • Customize the From address in Rails application

    - by palani
    Hi , I have mailer action in my application, the mailer is configured with gmail smtp. The following is my config details under environment.rb file require "smtp_tls" ActionMailer::Base.delivery_method = :smtp ActionMailer::Base.perform_deliveries = true ActionMailer::Base.raise_delivery_errors = true ActionMailer::Base.default_charset = "utf-8" ActionMailer::Base.default_content_type = "text/html" ActionMailer::Base.smtp_settings = { :address => "smtp.gmail.com", :port => 587, :domain => 'gmail.com', :user_name => "[email protected]", :password => "password", :authentication => :plain The think i want to implement is, when ever the application generating email the from address shows "[email protected]". Is possible to customize the from address. In different places i want to use different From address instead of "[email protected]" I tried with my mailer model: @from = "#{user.email}" In development server log it shows the customized id correctly. if go my email inbox it shows the from address as "[email protected]" Can any one please guide on this. thanks in advance.

    Read the article

  • Get address using Geocoder in android

    - by user264953
    Hi, I tried to get the address of a particular location by giving static geocordinates. I was not able to fetch the address. Can someone please help. I just need to check whether this function works for me. Here is my snippet. Geocoder geocoder = new Geocoder(AddressSimulator.this, Locale.getDefault()); List<Address> addresses = geocoder.getFromLocation(1.352566007, 103.78921587, 1); System.out.println("Addresses size"+addresses.size()); Address size is obtained as zero. I tried with few other geocordinates also, but address size is always returned as 0. Experts, kindly help me resolve this. Looking forward for your valuable help/suggestions, Best Regards, Rony

    Read the article

  • Facebook profile search using email address of a user

    - by agdev
    Hello, If I have email address of a user, is there any way to find the profile of the user? I know it can be done using the uid and name of the user (GetInfo() or fql.query). The specific problem I am trying to address is when I search for a user using the name field, I end up getting multiple results (people with the same name). I have the email address of the user I want to search, so if I can search using email address, I will be able to reach to the specific user. Alternately, if there's a way to find uid for a given email address, I can get the user I am looking for. Any help is much appreciated. Thanks!

    Read the article

  • What Keeps You from Changing Your Public IP Address and Wreaking Havoc on the Internet?

    - by Jason Fitzpatrick
    What exactly is preventing you (or anyone else) from changing their IP address and causing all sorts of headaches for ISPs and other Internet users? Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites. The Question SuperUser reader Whitemage is curious about what’s preventing him from wantonly changing his IP address and causing trouble: An interesting question was asked of me and I did not know what to answer. So I’ll ask here. Let’s say I subscribed to an ISP and I’m using cable internet access. The ISP gives me a public IP address of 60.61.62.63. What keeps me from changing this IP address to, let’s say, 60.61.62.75, and messing with another consumer’s internet access? For the sake of this argument, let’s say that this other IP address is also owned by the same ISP. Also, let’s assume that it’s possible for me to go into the cable modem settings and manually change the IP address. Under a business contract where you are allocated static addresses, you are also assigned a default gateway, a network address and a broadcast address. So that’s 3 addresses the ISP “loses” to you. That seems very wasteful for dynamically assigned IP addresses, which the majority of customers are. Could they simply be using static arps? ACLs? Other simple mechanisms? Two things to investigate here, why can’t we just go around changing our addresses, and is the assignment process as wasteful as it seems? The Answer SuperUser contributor Moses offers some insight: Cable modems aren’t like your home router (ie. they don’t have a web interface with simple point-and-click buttons that any kid can “hack” into). Cable modems are “looked up” and located by their MAC address by the ISP, and are typically accessed by technicians using proprietary software that only they have access to, that only runs on their servers, and therefore can’t really be stolen. Cable modems also authenticate and cross-check settings with the ISPs servers. The server has to tell the modem whether it’s settings (and location on the cable network) are valid, and simply sets it to what the ISP has it set it for (bandwidth, DHCP allocations, etc). For instance, when you tell your ISP “I would like a static IP, please.”, they allocate one to the modem through their servers, and the modem allows you to use that IP. Same with bandwidth changes, for instance. To do what you are suggesting, you would likely have to break into the servers at the ISP and change what it has set up for your modem. Could they simply be using static arps? ACLs? Other simple mechanisms? Every ISP is different, both in practice and how close they are with the larger network that is providing service to them. Depending on those factors, they could be using a combination of ACL and static ARP. It also depends on the technology in the cable network itself. The ISP I worked for used some form of ACL, but that knowledge was a little beyond my paygrade. I only got to work with the technician’s interface and do routine maintenance and service changes. What keeps me from changing this IP address to, let’s say, 60.61.62.75 and mess with another consumer’s internet access? Given the above, what keeps you from changing your IP to one that your ISP hasn’t specifically given to you is a server that is instructing your modem what it can and can’t do. Even if you somehow broke into the modem, if 60.61.62.75 is already allocated to another customer, then the server will simply tell your modem that it can’t have it. David Schwartz offers some additional insight with a link to a white paper for the really curious: Most modern ISPs (last 13 years or so) will not accept traffic from a customer connection with a source IP address they would not route to that customer were it the destination IP address. This is called “reverse path forwarding”. See BCP 38. Have something to add to the explanation? Sound off in the the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.     

    Read the article

  • OCaml: Currying without defined values

    - by nicotine
    I have two functions f and g and I am trying to return f(g(x)) but I do not know the value of x and I am not really sure how to go about this. A more concrete example: if I have functions f = x + 1 and g = x * 2 and I am trying to return f(g(x)) I should get a function equal to (x*2) + 1

    Read the article

  • returning a Void object

    - by Robert
    What is the correct way to return a Void type, when it isn't a primitive? Eg. I currently use null as below. interface B<E>{ E method(); } class A implements B<Void>{ public Void method(){ // do something return null; } }

    Read the article

  • Alias/shortcut in windows explorer address bar

    - by Stan
    The question comes from when opening 'Run' in start menu (windows key+R) and enter system32 will open up an explorer and directly go to C:\WINDOWS\system32. Q1: how to make my own alias, so when I enter photos, it brings me to c:\photos Q2: Is there any way to use alias in windows explorer address bar similar to that? Say enter photos in address bar and go to c:\photos Thanks

    Read the article

  • Change iPhone MAC address

    - by Freeman
    Hello, is it possible to change the iPhone MAC address? I have used ifconfig [interface] ether 01:02:03:04:05:06, but the MAC address does not change. Perhaps Apple has disabled the corresponding sysctl and it is necessary to patch the kernel.

    Read the article

  • Passing IP address with mod_proxy

    - by Konrad Garus
    I have Apache with mod_proxy passing requests to Tomcat. The trouble is, when I get client IP address associated with a request in web app hosted on Tomcat, it always returns 127.0.0.1. Is it possible to have Apache pass the original IP address to Tomcat?

    Read the article

  • Where to set catch-all address in Postfix (virtual mailboxes in affect)

    - by Cem
    I successfully configured Postfix to deliver messages to virtual mailboxes. I can set aliases and pipes inside /etc/postfix/virtual and mailboxes inside /etc/postfix/virtual_mailbox files. However, whenever I set a catch-all domain and point to a remote email address, it overrides all other virtual mailboxes and virtual aliases set in postfix. How can I set a catch-all forwarding to the remote email address when virtual mailbox is enabled? I set catch-all like this: @mydomain.com [email protected] Thanks for your help!

    Read the article

  • VBScript Regular Expressions to check IP address validity with some adtional characters

    - by yael
    How to create VB script Irregular expression syntax to check the VPparam (IP address validity) When the last octatat of the IP address is a range between ip's (x-y) and between each IP we can put the "," separator in order to add another IP example of VBparam VBparam=172.17.202.1-20 VBparam=172.17.202.1-10,192.9.200.1-100 VBparam=172.17.202.1-10,192.9.200.1-100,180.1.1.1-20 THX yael

    Read the article

  • I recieved an email but the to address is not mine

    - by user35072
    As per title, my email address is [email protected] and received an email from [email protected]. But in my Web Client i see: From: [email protected] To: [email protected] I received this on my [email protected] account so how did i get this email in my inbox? I have no affiliation whatsoever with [email protected]. Actually i have received a few emails from [email protected] where the TO address differs. What's going on?

    Read the article

  • DynDNS updating IP address via Cisco ASA 5505

    - by yonatan
    I'm setting up an ASA 5505 where the ISP provides a dynamic IP address (rarely changes.) I would like to start using some of the services provided by DynDNS such as Custom DNS. I've come across some information regarding Cisco Routers and DynDNS, but nothing definitive on the ASA platform. My question is whether I can configure the ASA5505 to update the IP address rather than install the DynDNS Updater software on a machine running on the LAN? Thanks

    Read the article

< Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >