w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to block HTTP analyzer to decode ma HTTPS data?
If you want to prevent a man-in-the-middle attack, you need to ensure that the SSL certificate is trustworthy. If the https traffic can be intercepted then either the SSL certificate isn't from a trusted source, or the analyser has access to the private key. If you want to learn more and see how it works, have a look at this post about Fiddler. Fiddler acts as web proxy and can be configured to decrypt https using man-in-the-middle. Why make use of HTTPS when Fiddler can decrypt it

Categories : C#

Facebook like button https issue: protocol mismatch from http and https
Reviewing the js code on Facebook there are multiple urls containing hard coded strings for http://static .../rsrc.php it's possible those are the files triggering the error. This may be something Facebook needs to update. On a side note, it may be possible to download that js file from Facebook and store it on your server and remove the hard coded http string. I would test this further but I am on my phone at the moment.

Categories : Facebook

Block pointer variable 'block' is uninitialized when captured by block
To just declare your block you would use void (^block)(void); then initialize it with block =^ // Get warning here! { next = dispatch_time(next, DELAY_IN_MS * 1000000L); // Do my periodic thing ... dispatch_after(next, dispatch_get_main_queue(), block); } That is why putting in the semicolon works. Why it gives you an error without the semicolon: you are referencing block in its own declaration/assignment. You are using it in the "dispatch_after" call, but its not fully set up yet.

Categories : IOS

How do you enable https and http->https redirects in ring / compojure
It's possible to serve HTTPS with clojure, but it's much more popular to put nginx or something like that in front of your ring server. If you can figure out how to configure jetty, though, run-jetty clearly supports SSL.

Categories : Http

when using https, https can't find codeigniter controllers. Running Centos
Change this line : RewriteRule ^(.*)$ index.php?/$1 [L] to : RewriteRule ^(.*)$ /index.php?/$1 [L] The .htaccess would otherwise be redirected relatively to a index.php in the join folder, which off course is not there.

Categories : PHP

Once https page is visited, all subsequent pages are served from https
ok I think I found the reason. The links I am visiting are relative, so "/forum" for example. Once https is in the browser it seems like visiting a relative address is leaving the root as https:// and appending the relative path. I believe the fix here will be to use the full path for the link instead of relative.

Categories : Htaccess

Can https fallback to http and security level of https
No, HTTPS never falls back to HTTP automatically. It would take deliberate action by the user. If you're just going to a web page by putting its URL into the address bar, this is easy; for form submission it's harder. Yes, sending plain text over SSL is fine. In fact, sending a hashed password doesn't really increase security much at all -- if someone manages to sniff the connection and gets the hashed password, that's all they need to be able to login to the site. It has one small advantage: if the user uses the same password at multiple sites, learning the hashed password for one site doesn't help them get into another site that uses a different (or no) hash. And it's not likely to be feasible to send salted hashes, since the client doesn't know the salt. A cnonce adds an extra level

Categories : Asp Net

How can i convert links to https when server providing https?
If you remove the http:// portion and use instead: <script type="text/javascript" src="//static.monstermmorpg.com/js_files/jquery-1.9.1.min.js"></script> It should request based on the current scheme being used.

Categories : C#

Redirect all http AND https non-www URLS to https://www.xyz.com via htaccess
In case anyone from the future (HELLO PEOPLE OF THE FUTURE) stumble across this, I asked the same question and had it answered over at Server Fault. Short version: impossible. Long version: http://serverfault.com/questions/523199/redirect-all-http-and-https-non-www-urls-to-https-www-example-com-via-htaccess

Categories : Htaccess

HTTPS GET request to https://www.googleapis.com/plus/v1/people/me
Create a Google_Oauth2Service object (put it under the $plus initialization), like: $client = new Google_Client(); $plus = new Google_PlusService($client); $oauth2 = new Google_Oauth2Service($client); and after succesfully authenticating the client use: $userInfo = $oauth2->userinfo->get(); $email = $userInfo['email'];

Categories : PHP

IHttpHandler to redirect "https://example.com" to "https://www.example.com"?
If you use IIS7, you might want to try URL Rewrite Module. http://www.4guysfromrolla.com/articles/072810-1.aspx http://www.jppinto.com/2010/03/automatically-redirect-http-requests-to-https-on-iis7-using-url-rewrite-2-0/

Categories : Asp Net

Show text block under an image block on clicking the image block
You want like this, check DEMO http://jsfiddle.net/yeyene/gNQVR/1/ JQUERY $('#imageDiv img').on('click', function(){ $(this).hide(); $(this).siblings('#textDiv').show(); }); $('#textDiv .close').on('click', function(){ $(this).parent('#textDiv').hide(); $(this).parent().siblings('img').show(); }); HTML <div id="imageDiv" > <img src="http://wallpaper-fullhd.com/wp-content/uploads/2013/03/at-the-beach-hd-wallpaper-1920x1200.jpg" class="close" width="200" height="200"> <div id="textDiv"> <a class="close">x</a> This is the text for the image. ...</div> </div>

Categories : Javascript

Trying to have a view & block have access to a variable from a another block that is used to determine which element number in array
Is there no natural order to these steps? You don't have an 'i' you can pass in when you include the partial (partial local variables)? If not, it sounds like you need a slightly smarter 'Step' object that is aware of its index in the workflow. You could also place the icon list in a helper, like so: def icons ["icon-link", "icon-bar-chart", "icon-edit", "icon-beaker","icon-link", "icon-bar-chart", "icon-edit", "icon-beaker"] end Gets it out of your view.

Categories : Ruby On Rails

Error regarding using a block within a block in Ruby - Array can't be coerced into Fixnum (TypeError)
commonMultiples is already an Array, and in find_sum_for_each_multiple, it gets converted to an Array of Arrays Change this line sumsOfCommonMultiples = find_sum_for_each_multiple(from, to, commonMultiples) to sumsOfCommonMultiples = find_sum_for_each_multiple(from, to, *commonMultiples)

Categories : Ruby

A module I uploaded block is displaying before the catalog category block. How do I change it?
The before and after attributes only work in one of two cases When you insert into a core/text_list block like your template block calls getChildHtml without any paramaters For example <reference name="root"> <block type="core/template" name="example_block" after="content" template="page/html/example-block.phtml"/> </reference>

Categories : Xml

Keep another div displayed block when I mouse over button but then close block element if I were to roll over it
Set the other div to display: none in your CSS and use jQuery's fadeIn() and fadeOut() methods to toggle it on/off: $(".button").on({ mouseenter: function (e) { $(".other-div").fadeIn(); }, mouseleave: function () { $(".other-div").fadeOut(); } }); See DEMO.

Categories : Jquery

Block in a block not call in ad hoc archive ,but runs normal with xcode
Your local variable is __weak ARC is allowed to nuke this reference the minute requestWithURL: ... returns (the return decrements the retain count, __weak doesn't increment it). Your request variable is therefore going to be released and set to nil before you can call startAsynchronous on it. Why did you make that local variable __weak? There is no unbreakable retain cycle involved in your code when you remove it. I believe that the completion block is nil'ed out (and released / destroyed) after it is invoked. If this isn't the case, and you have a true leak here then you'll have to create another, non-weak reference to the ASIFormDataRequest so that it doesn't get blown away during your method. The reason the AdHoc version doesn't work is because AdHoc is built with the Release t

Categories : Iphone

blktrace output & block sizes in linux block layer
Blktrace gets its data from the Linux kernel which considers sectors to be 512 bytes long. So I think that, regardless of the device physical sector size, blktrace displays offsets and sizes in 512-bytes sectors. You can make a test with dd to verify what happens and record disk accesses with btrace. For instance, dd if=/dev/something of=/dev/null bs=512 count=1 skip=512 For your second question, a lot is happening in the block layer: I/O requests are buffered, merged, scheduled. So don't be surprised if the kernel make disk accesses with a different block size than the one specified in your application.

Categories : Linux

Webkit displaying non-cached inline-block images as block
If the images have been cached then they will always display correctly. Make sure the width of the container is less than 100% Make sure the position and float properties are not set Make sure the important value is syntactically correct: display: inline-block !important;

Categories : CSS

How to redirect from url: https://myfavourite.test.com/Account/LogOn?ReturnUrl=/ to url: https://myfavourite.test.com/ using IIS7.5
I followed the steps mentioned in the below mentioned article and it helped me. http://www.trainsignal.com/blog/iis7-url-rewrite-extension-on-windows-server-2008 I used the Redirect option and then added a Blank rule with the following regular expression: account$|account/(?!LogOff) and that helped me to resolve the redirection issue.

Categories : Asp Net Mvc

Block syntax error from Apple example 'Creating a Block'
that block doesnt have a return type, and the default return type is void, you will need to go float (^oneFrom)(float); oneFrom = ^ float (float aFloat) { float result = aFloat - 1.0; return result; }; here is a better blocks example

Categories : Objective C

z-index not working with absolute block on relative block
navigation and #profileMenu has the same z-index, which is 2, set profileMenu's z-index to a higher value. fiddle : http://jsfiddle.net/rqeRC/2/ #profile { float: right; margin: 60px 47px 0px 0px; position: relative; z-index: 3; } #navigation { float: right; margin: 60px 47px 0px 0px; min-height: 248px; position: relative; width: 248px; z-index: 2; }

Categories : CSS

Convert large text block to json block
Once upon a time I used this code snippet for sending POST data using curl. urlquote() { echo -ne "$1" | xxd -plain | tr -d ' ' | sed 's/(..)/%1/g' } It works great with unicode stuff as well. Maybe this is going to help.

Categories : Json

Which block is executed first when we have multiple catch for a single try block? and why?
The first catch that meets the criteria (this criteria also includes exception types that inherit from the type too) for the type of exception thrown will execute. This is why you put more specific exception types earlier in the list and the most generic exception types at the bottom. In your example, the last catch will never execute, because the catch(Exception ex) above it will catch all exception types, as every exception is based upon the System.Exception class. So from the code you posted, the only guarantee is the last one will never execute if you are using strictly .NET code, it is possible for an exception to generated outside of .NET that does not inherit from System.Exception. For all the others, it depends upon the type of exception as to which one will actually execute.

Categories : Asp Net

Magento overriding block makes block disappear
I'm not sure about the order of operations with the layout xml.. But i know i've removed tabs on other modules from my local.xml in the design folder like this: <module_controller_action> <!-- **(Direct accordingly) --> <reference name="the_specific_tabs_block_name"> <action method="removeTab"><name>transactions</name></action> </reference> </module_controller_action> Way better than making a class and extending the original. (if it works) Good luck.

Categories : Magento

Does a using block guarantee that the object will not be disposed until the end of the block?
No it doesn't. There's nothing stopping you from doing: using(var myObject = new DisposableObject()) { myObject.Dispose(); } What exactly will happen in this case depends on the semantics of DisposableObject. It may throw an exception, or it may be perfectly happy with Dispose being called twice. It should be noted that object disposal and garbage collection are completely different concepts. Just because an object is disposed doesn't mean it will be garbage collected and just because an object has been garbage collected doesn't mean it will be disposed. An object may be garbage collected once all references to the object are destroyed or are unreachable. That can't happen while the code is running inside the using-block, because the block itself has a reference to the object.

Categories : C#

What is the difference between block and inline-block with width: 100%?
What you said is pretty much correct: "an inline-block element seems to be able to do anything a block element can do, but with a little extra styling." However, there's a catch. A block-level element participates in a block formatting context, and an inline block participates in an inline formatting context (although it may itself create a block formatting context just like a block-level element). See section 9.4. Basically, this means an inline block acts as though it were text, which in turn means most properties that usually apply to text would also apply to an inline block. These properties include text-indent, text-align and vertical-align, among others. This can cause undesired side effects which you can easily prevent by not using display: inline-block in the first place. See thi

Categories : CSS

Is there an elegant way to float a block into the block that is from the left of it
I've made an update to your fiddle: http://jsfiddle.net/D3Ftp/1/ Here's the updated CSS: #b { width: 50px; height: 20px; background-color: cyan; position: relative; } #outer_a ~ #outer_b #b { left:-100%; } The left style will only be applied, if #outer_a is followed by #outer_b. Try and remove the first div block in the fiddle, and see the magic :) Edit: I see, that where I've been using percentages, the width of #outer_b does not change as per your requirements. I don't think there's a prettier solution than the marign-left:-Ypx; for that specific requirement.

Categories : HTML

Access Stack Block from within Block using ARC in Objective-C
The parameter block is not used anywhere in your code. Let's supposed that you meant to use block inside someBlock. Variables of object pointer type captured by a block are retained when the block is copied. Furthermore, variables of block pointer type captured by a block are copied when the block is copied. So, when someBlock is copied, block will be copied. In ARC, a stack block that is returned directly is automatically copied before returning. Thus, someBlock, and also block, will be caused to be copied. No, foo: does not need to explicitly copy block, because it is not doing anything to explicitly store it (in an instance variable or something).

Categories : Objective C

Anonymous block acting like static block
{ System.out.println("inside static..."); } ... is not a static block, it's an instance block. static { System.out.println("inside static..."); } ... would be a static block.

Categories : Java

Read text file block by block
Unless the rows are exactly the same length, you can't start directly at row 50001. What you can do, however, is when reading the first 50000 rows, remember where the last row ends. You can then seek directly to that offset and continue reading from there. Where the row length is fixed, you do something like this: myfile.Seek(50000 * (rowCharacters + 2), SeekOrigin.Begin); Seek goes to a specific offset in bytes, so you just need to tell it how many bytes 50000 rows occupy. Given an ASCII encoding, that's the number of characters in the line, plus 2 for the newline sequence.

Categories : C#

why resizableImageWithCapInsets's best performance is tiled by 1x1 rather than block by block
@jhabbott makes a good guess in his comment on the accepted answer to the question How does UIEdgeInsetsMake work? So, I think if the tiled area is just 1x1 pixel. Then, resizableImageWithCapInsets: can just use that pixel's color as the fill color. That way, it doesn't have to do any tiling at all. So, essentially, it's like setting view.backgroundColor = color. Have you ever written any drawing code? Basically, I think filling an area with a color is easier than tiling that area with a rectangle of pixels, since the latter probably takes more calculations, like where to position the next tile, etc. But, I'm just guessing here. But, if you try to write the drawing code to fill a rect with a color vs to tile a rect of pixels onto another rect, you'll see where I'm coming from.

Categories : IOS

apache redrict 301 from https://www.domain.com to https://domain.com
If you request https://www.meinedomain.de/ and your cert isn't authorized for www.meinedomain.de, then you'll get a security warning regardless of how you redirect. The redirect can only happen after they accept the security exception. Make sure you've put those rules in the SSL vhost's config, not the non-SSL one. Apache usually has them separate. If that still doesn't work, you can try just putting this in an htaccess file in your document root: RewriteEngine On RewriteCond %{HTTPS} off [OR] RewriteCond %{HTTP_HOST} ^www.meinedomain.de$ [NC] RewriteRule (.*) https://meinedomain.de%{REQUEST_URI} [R=301,L]

Categories : Apache

Fit a block to its content, but keep its block abilities
You will need to use clear: right on all "rows". So for instance: <div class="container"> <div class="medium right clear">block 1</div> <div class="large right clear">block 2</div> <div class="small right clear">block 3</div> <div class="small right clear">block 4</div> </div> CSS required: .right { float: right; } .clear { clear: both; } .medium, .large, .small { /*some markup for your blocks*/ } DEMO: http://jsfiddle.net/tive/MFrBs/

Categories : HTML

inline-block vs block with pictures
The answer is yes: an inline-block element is still a block. Blocks have specific heights and widths and therefore, when you put a border around them, you know how large the border is going to be. Inline elements on the other hand, don't have a constant width or height. Take this strong Lorem ipsum dolor <strong> sit amet, consectetur adipisicing elit, sed</strong> that may look like it's one line high, but it may come out like this when your screen is narrow enough: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed which an inline-block can't do. Now what is the height? Two lines? And the width? negative? Its end is to the left of its start! In other words, you can't really tell. And neither can the browser. So if there's a large element in it, li

Categories : HTML

Trouble displaying a custom block under the default cart block on the checkout/cart page
This should work : <?xml version="1.0"?> <layout> <checkout_cart_index><!-- You just need to update the layout for the cart page, so you can use the corresponding action name --> <reference name="content"><!-- A single reference to the wrapping "content" block is enough (you want to put content below the cart, not inside) --> <block type="module/checkoutextras" name="checkoutextras" as="extras" template="fracture/module/checkoutextras.phtml" after="-" /> </reference> </checkout_cart_index> </layout>

Categories : Magento

Refactoring a nested if statement: first check if block exists, then apply another if statement on block.call
I would write the 2 inner conditions into 1 statement. def top_method(&block) if block && block.call another_method1 another_method2 else another_method3 end end

Categories : Ruby

What is exact reason behind the execution of finally block in asp.net?i know its by design, in finally block i should do resource cleanup
It's almost always around resource cleanup - or sometimes logical cleanup of getting back to a reasonable state. If I open a file handle or a database connection (or whatever) then when I leave that piece of code I want the handle to be closed regardless of how I leave it - whether it's "normally" or via an exception. finally blocks are simply there to give that "Execute this no matter what1" behaviour which can often be useful. 1 Well, within reason. Not if the process dies abruptly, for example - of if the power cable is kicked out.

Categories : Asp Net

"Retain'ed block property does not copy the block - use copy attribute instead
Blocks need to be copied before they are stored (and in some cases just before you use them, but that's usually a strange bit of code) because blocks are created on the stack and need to be moved to the heap. If the block isn't copied and the context in which it was created is destroyed then it won't always work properly. This is the case when the block captures some external variables (instead of only using the passed parameters).

Categories : Objective C

Center align an inline-block div with inline-block siblings
Not as far as I'm aware unfortunately. I'm not sure you need anything "radically different"; you will need to change your markup very slightly, though it is entirely possible to do exactly what you're asking. It's difficult to offer a solution without knowing a little more about the context. For instance, if you just wanted the content of the div to be center aligned then I'd suggest text-align:center;. If you want to have a background on the centered element then just nest another div/span etc inside. If you're really stuck then please explain a little more of what the purpose is, and I'll try to help you come up with a solution. Here's a solution based off that: HTML <div id="container" class="cf"> <div id="sidebar"></div> <div id="message"> &l

Categories : HTML



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