w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Is Changing local IP address similar to changing Public address?
Given that the host uses the IP to identify you: The host you are connecting to sees the public address, and this is what then needs to be renewed. You can try it yourself; grab another device on the same network as the one you used first, and try to connect. You'll find that you still have to wait. The local IP-address can only identify you within the local network. The reason is that there's a limited number of IPv4 adresses, so only your router get's a public IP-address, and then your devices get's a local IP from the router. The router then works to send the packages directed at the public address to the correct local IP.

Categories : Networking

DHCP and IP address acquired event
If you're on a desktop distro running NetworkManager, it will run scripts in /etc/NetworkManager/dispatcher.d when the network interface changes state, passing information via the command line and environment variables. I forget the details, but you can check the documentation and existing examples. NetworkManager also has a dbus interface, which you can listen to for the same information. Running (as root) dbus-monitor --system while you bounce your interface will show you the relevant signal.

Categories : Linux

Assigning label text shows only format string
You see %d because that is the string you are assigning to the text label, everything after the string literal is ignored (I'm surprised it even compiles): cell.textLabel.text = @"%d", [wordListV2 count]; What you want to do is to create a new NSString using a method that understands and processes format strings: cell.textLabel.text = [NSString stringWithFormat:@"%d", [wordListV2 count]]; The reason that the NSLog() works is because it can process format strings. However, ObjC properties do not handle format strings.

Categories : Objective C

list.getchildAt(i) return null pointer ,only shows visible views not shows more
I guess you should think fo a better approach than iterating over the EditTexts with getChildAt() to collect all the value. I take it that the user can change the values in the EditTexts, you can have an Array of size 30 of Values and everytime the user enters / changes a value you change the according value in the Array. Use a listener that changes the values in your Array like this.

Categories : Android

My horizontal navigation menu shows as 1 line in chrome, others shows 2 lines
you are aware that in: .mainnav ul li a:link,.mainnav ul li a:visited there are double padding decalarations? padding:4px; padding: 0 0.73em; You can combine those: padding: 4px 0.73em; Seems that the issue with the navigation list is that there is too much spacing in between them in combination with the amount of items. I there are too much items, the normal behavior is the wrapping, you could decrease spacing, font-size to fix this.

Categories : HTML

My hibernate application shows message in console and shows session closed error on browser
At first look it seems like a possibility of 2 issues ContactManager object which you are trying to save is null Your variable name 'Contact' is incorrect, it should be 'contact' (some hibernate thingy) Where is your hbm.xml file ? There may be a reference of 'Contact' the class in that file still around somewhere Edit Solutions Put a if (developer != null) before your 'save(developer)' Rename Contact to contact Put the hbm file contents on the question, without that cant review the mapping Hope it clear now. Edit 2 : Do a clean build. Its possible your build is not updated.

Categories : Hibernate

Assigning int value to an address
Your both expressions are incorrect, It should be: int x, *ra; ra = &x; // pointer variable assigning address of x & is ampersand is an address of operator (in unary syntax), using & you can assign address of variable x into pointer variable ra. Moreover as you question title suggests: Assigning int value to an address. ra is a pointer contains address of variable x so you can assigning an new value to x via ra *ra = 20; Here * before pointer variable (in unary syntax) is deference operator gives value at the address. Because you have also tagged question to c++ so I think you are confuse with reference variable declaration, that is: int x = 10; int &ra = x; // reference at time of declaration Accordingly in case of reference variable, if you wants to as

Categories : C++

RTL does not shows records as expected
I'm not sure about how you do support right to left on your site, and I can't comment yet to ask you some clarification (it would be useful some html output in addittion to the screenshots), so I'm trying to guess. Your second screenshot doesn't show the order you said, in my opinion. Looking closer at contents between brackets, the RTL order result appears to be the same than before -book 5, first line-, reading from left to right, but with 32 ( pushed to the right and inverted so that it looks like ) 32. Something similar on the second line: the ). from the right side pushed to the left as .(. I don't understand how it was messed up like that, but it doesn't seem to be a sorting problem, but a matter of layout related to the RTL displaying. I would check if the output from PHP is the e

Categories : PHP

String variable shows as empty but length shows it to not be
.NET uses BStrings, which are length-prefixed and null-terminated. So if the first character in RecievedString is the null character (''), then it will not be printed, since strings end at their first null character.

Categories : Vb.Net

Assigning pointer to a different address in function
If you labeled the question C, what you taught it would be acceptable. For C++ it is techically correct but morally wrong, you should pass by reference to modify the object, not fiddling with pointer and address. In your code you get what you coded for: pass a pointer and then reassign that poitner's value. That is not visible outside the function. What you intended to do is void f(int *x) { *x = 42; } and the C++ version would be like: void f(int &x) { x = 42; } int main() { int z = 35; f(z); cout << z; }

Categories : C++

Assigning IP address to docker containers?
Caveat - Docker is under heavy development so confirming against current docs is advisable. The network element is one of those under current discussion on docker-dev, it looks like longer term integration with libvirt is being considered. So to answer your question NET DHCP or something is probably not implemented as you'd want. Some of how Docker's networking is implemented is described in this blog post. Currently a set of IP ranges in CreateBridgeIface in network.go. For the meanwhile you might want to checkout pipework which is a tool designed to be used with Docker for various network configuration. This will allow you to add and modify IP addresses on your container, create private networks and connect containers to a physical interface. In the end it's wrapping lower level tool

Categories : Misc

Assigning address of an int to a char pointer
You didn't take endianness into account. On a little-endian system, the 'a' (or if the encoding isn't ASCII compatible, whatever 65 is) will be in the first byte, and the other bytes are 0. Passing a 0 byte to printf("%c ",_); prints out nothing but the newline.

Categories : C

std::bad_alloc assigning a pointer from address of a reference
There is no possible way that code can raise a std::bad_alloc exception (or any other exception, for that matter), since all you are doing is assigning a pointer value to a pointer variable. std::bad_alloc is raised by the new and new[] operators when a memory allocation fails, and there is no such memory allocation being performed in this code.

Categories : C++

Updated Appointment via EWS shows UTC instead of local TZ
I've been having the same issue as we're using ExchangeVersion.Exchange2010_SP2 but i'm managed to get round this using: appointment.Save(SendInvitationsMode.SendToNone); // to fix the issue of updating appointment sets timezone to UTC, we use ExchangeVersion.Exchange2007_SP1 service = new ExchangeService(ExchangeVersion.Exchange2007_SP1); service.UseDefaultCredentials = false; service.Credentials = new WebCredentials(Account, Password); service.Url = new Uri(url); service.Timeout = 600000;

Categories : Misc

Only one link in a list shows
Remove * { height: 100%; } and position: absolute from #leftone li See http://jsfiddle.net/c6Fdk/1/

Categories : HTML

Java Connect Over A Socket Using Public IP Address
There are two possible problems I can think of: You didn't forward your ports correctly, or there's some other problem with your router configuration. In that case, your question is better asked on Superuser. Your server is listening only on your loopback interface. Make sure in your server code you have it set to listen on 0.0.0.0, or whatever your library/OS equivalent is.

Categories : Java

Generating Bitcoin address from ECDSA Public Key
Assuming what you're doing is based on this conversion: I'll describe what you can do in pseudo-code: First extract x, y from public key. // get x and y from Public key "point" EC_POINT_get_affine_coordinates_GFp(group, pub_key, x, y, ctx); // convert BIGNUMs x, y into binary form BN_bn2bin(x,x_char); BN_bn2bin(y,y_char); Next you need to do message digest several times, including 3 sha256 and 1 ripemd160. In the following pseudo-code I'll show you how to do ripemd160. To do sha256 with EVP_MD, just replace EVP_ripemd160() with EVP_sha256(), and update (input to EVP_MD) your input message with single or several EVP_DigestUpdate(). EVP_MD_CTX ctx; EVP_MD_CTX_init(&md_ctx); EVP_DigestInit(&md_ctx, EVP_ripemd160()); // hdr = 0x04 EVP_DigestUpdate(&md_ctx,hdr,1); EVP_Digest

Categories : C++

want to hide/modify my link in address bar while opening a link in web browser using java swing
You're not able to do that with the Desktop.browse() method. The URL will be visible to the user. You could perform a server side redirect afterwards, but the user would still see the original URL for a short time at least.

Categories : Java

How can I set what shows up for the link preview on Facebook?
inspect your url with Facebook debugger. Then update your OG meta tags. And the deubgger itself it's the only way to force refresh cached data by facebook.

Categories : Facebook

What are some ideas for when "Inspect Element" in Chrome shows the expected behavior of CSS but actual result is different?
You could always check for !important on lower down lines. I think that happened to me once, and I don't think it put a line through my style that was being overidden. (It may have though it was a long time ago it happened.) The only way really around that if that's the case and if that !important is necessary is to add !important to your rule you want to overwrite with. (Try to avoid using importants wherever possible though, because in most cases an important isn't necessary.)

Categories : CSS

Try to show image but shows a broken link instead
if you want image you need to enclose it with image tags. assume if your $imageData contains the location of the image then you can do the following. <img src='<?php echo $imageData;?>' ... /> if your $imageData contains actual binary data of an image you need to create a separate call to a php script to return the imageData. and make the call to be the src attribute of an img tag.

Categories : PHP

setup git push/pull to localhost without public IP address in a ssh session
If localhost doesn't have a public IP address, you won't be able to connect to it from the remote machine. You must initiate all commands (e.g. git push, git pull, git fetch from localhost, otherwise it won't work.

Categories : GIT

GRAPH API Post action always shows 'shared a link via app name'
I am trying to publish a story through my application. But when I do so it display saying that "Some has shared a link app name" That’s because that is exactly what you are doing – you are posting a link. The second image you’ve shown is not a link post, but an Open Graph action – start here to familiarize yourself with the concept: https://developers.facebook.com/docs/opengraph/

Categories : Facebook

Access Voilation at address 00407518 read of address C3EF9FFE on form close?
Your stomping on your strings...change to move(arr1[ind],user[1],length(user)); ind:=ind+length(user); move(arr1[ind],s1[1],length(s1)); ind:=ind+length(s1); move(arr1[ind],ip[1],length(ip));

Categories : Delphi

How to check if address is contained in a continent or close to another address in android google maps api v2?
For the start I assume you are familiar with the GeoCoder and / or GeoCoding API to get the addresses for your locations. If you use the GeoCoder you will get a List of Address objects. The Address class provides some methodes to get the country or city name f.e. These methods you can use for your filter. The Location class includes the methods distanceBetween() and distanceTo(). These you can use to check the distance between your locations.

Categories : Android

Is the memory address returned by malloc/calloc from virtual address space?
All addresses you see in user space applications are virtual addresses. Physical addresses are only of concern to the kernel. The mapping from virtual to physical addresses is complex, given that: Not all virtual addresses have physical addresses at all. (For instance, pages that are unmapped, lazily zero-filled, or swapped out have no physical address.) Physical addresses may change without warning (e.g, if a page is swapped out and back in, or if a shared page is copied). Outside of some very unusual situations (mostly having to do with messing around with hardware), you should not care about physical addresses.

Categories : C

What could cause Magento to change new address back to default address on Paypal redirect?
I had a similar bug and maybe its the same with you. If you select an address as your default address in the address book it screws up the one page checkout. Say I have 3 people in my address book: John, Suzy and Bill. One day I happen to be in my address book and I select John as my default billing and shipping address. Then I go to my cart, order some items, select John as billing, and select ship to a different address. On the next step I select Suzy as my ship to address. I click next to go to the shipping method step, but whoa, wait! Suzy's address has been overwritten and replaced with Johns address. Its exactly the same issue posted about here (although I dont think the guy understands what happened, but the screenshots are the same result): http://www.magentocommerce.com/boards/

Categories : Magento

Get User's IP Address in a Share Point Web Part not giving valid IP address
Use this, string ip = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; if (string.IsNullOrEmpty(ip)) { ip = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]; } Or use string ipAddress = Request.UserHostAddress

Categories : C#

Display webpage address in browser address field which is loaded into iframe
You can't. What if http://fakebanksitewithrealbanksiteiniframe.com could just display http://yourbank.com?

Categories : Asp Net

DNS lookup failed: address 'your.proxy.com' not found: [Errno -5] No address associated with hostname
**Error that I get** - scrapy crawl Linkedin **2013-07-29 11:37:10+0530 [Linkedin] DEBUG: Retrying <GET http://www.linkedin.com/nhome/> (failed 1 times): DNS lookup failed: address 'your.proxy.com' not found: [Errno -5] No address associated with hostname.** **To see if the Name space was resolved, I tried -:** nslookup www.linkedin.com #works nslookup www.linkedin.com/uas/login # I think the depth of pages within a main website, does not resolve, and is normal right ? Then I also tried to see if the error could have been due to Name Server not resolving and appended the Nameservers as below . echo $http_proxy #gives http://username:password@your.proxy.com:80 You have a proxy set: http://username:password@your.proxy.com:80. Obviosly, it doesn't exist in Internet: $ nslookup y

Categories : Python

Address and Address Range Syntax search memory when using windbg to do debug
The L refers to the length of the range to search so using 0012ff40 as starting range, plus 32 bytes would give end address of 0012ff5f (remember it includes the starting address). To answer your second part the -d flag tells WinDbg the type of the object, in this case DWORD which will be 32-bit unsigned integer

Categories : Debugging

what 's the difference between application's enter point address and excuteable start address
Terminology is fuzzy but I think I know what you are talking about. A language needs runtime support. Standard for C and the C++ languages is the CRT. The CRT needs to be initialized before the program can start running. Opening stdout and stdin, initializing static objects, setting up signals, that sort of thing. Two basic ways that's done, the compiler can inject a call to the initialization code in the main() entrypoint of the program. Before the rest of the code inside main(). That's typical for simple operating systems that don't have a fancy loader. Both the entrypoint and the executable start address are the same. Also the reason why the language standard forbids recursing main(). Or it can be done by setting the executable start address to the runtime initialization funct

Categories : C++

Get the local IP address associated to a local MAC address
You can use NetworkInterface for this (http://docs.oracle.com/javase/6/docs/api/java/net/NetworkInterface.html): Enumeration<NetworkInterface> interfaces = NetworkInterface.getNetworkInterfaces(); while (interfaces.hasMoreElements()) { NetworkInterface i = interfaces.nextElement(); if ( i.getHardwareAddress().... ) { } }

Categories : Java

Only one usage of each socket address (protocol/network address/port) is normally permitted. - bind(2) (Errno::EADDRINUSE)
You can run rails server with specified port by console instead of NetBeans IDE. I think NetBeans also can set ports, but I didn't used this IDE for long time and forgot it.... In your project folder first. If you are using Rails 2.* > ruby script/server -p 3001 If you are using Rails 3+ > rails s -p 3001 -p XXXX is the port you will use, you can specify a port that is different with another user's. Hope it helps.

Categories : Ruby On Rails

How do you parse a street address from a single cell in Excel into individual cells when the address format isn't consistent?
I guess you can do a combination of MID & FIND to extract parts of the address, e.g. =IF(IFERROR(MID(A1,1,FIND(",",A1,FIND(",",A1)+1)),1)=1,MID(A1, 1, FIND(",",A1)-1),MID(A1,1,FIND(",",A1,FIND(",",A1)+1)-1)) will extract the address from cell A1, depending of the number of commas it finds (1 or > 1). ZIP and state won't be too difficult following the above mentioned pattern. I think the problem is extracting the city as you don't know where to set the limit between the city name and the street unless you have a finite set of street types, e.g. ct, st, way etc.

Categories : Excel

How to pass address of BOOL to a method accepting address of VARIANT_BOOL?
The solution is that you should not use a cast for this because BOOL is typedefed to int and VARIANT_BOOL is typedefed to short and so they most likely will have different sizes. Declare a VARIANT_BOOL variable and pass its address, then interpret the result.

Categories : C++

Find Computer Name,Operating System name of a given IP address or MAC address In java
import java.util.Map; public class EnvMap { public static void main (String[] args) { Map<String, String> env = System.getenv(); for (String envName : env.keySet()) { System.out.format("%s=%s%n", envName, env.get(envName)); } } } I guess you need the following properties: COMPUTERNAME OS regarding MAC Addrss and IP Address you have 2 options: use InetAddress ip; try { ip = InetAddress.getLocalHost(); System.out.println("Current IP address : " + ip.getHostAddress()); } catch (UnknownHostException e) { e.e.printStackTrace(); } or use ipconfig/ifconfig output but I'll leave the choice it to you

Categories : Java

windbg:Getting source code file at give address like "u address"
If You have the source code of debugging code why would You like to browse/view it from windbg? Source mode makes debugging very simple but windbg is not a "code browser". If You want to see the source code at the given address simply check what function "covers" this address e.g.: kd> uf fffff800`02be05d0 nt!NtOpenFile: fffff800`02be05b0 4c8bdc mov r11,rsp ... fffff800`02be05d0 458953e0 mov dword ptr [r11-20h],r10d Then ctrl-o and open your source code that contains this function(your func ofc unless You work for microsoft :D) and browse it in windbg.

Categories : Debugging

how is virtual address translated to its physical address on backing store?
This is OS-specific, but many implementations share logic with memory-mapped file features (so that anonymous pages actually are memory-mapped views of the pagefile, flagged so that the content can be discards at unmapping instead of flushed). For Windows, much of this is documented here, on the CreateFileMapping page

Categories : C

Local wordpress install only shows home page, all other pages Not Found
Log in to the admin panel (localhost/sitedirectory/wp-admin) and go to Settings->Permalinks and click Save Changes. Permalinks often need to be rebuilt after mirroring a site and updating the site url. You don't need to change any settings, just hit save and it will rebuild the permalinks with the selected options. Also make sure the Apache module mod_rewrite is enabled on your local stack. IIRC WAMP (and possible XAMPP) do not enable this by default. Doing so in WAMP is as simple as clicking the WAMP icon in the taskbar, then going to Apache -> Apache Modules -> mod_rewrite (click to toggle) and then restart all services. Also I am assuming you already updated the site and home urls (either in the wp_options database table or in wp-config.php). For reference there is a Codex page a

Categories : Wordpress



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.