htaccess redirect to https://www

htaccess redirect to https://www

I have the following htaccess code:RewriteEngine OnRewriteCond !{HTTPS} offRewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]RewriteCond %{HTTP_HOST} !^www\.RewriteRule ^(.*)$ https://www.%{HTTP_HOST

Variable might not have been initialized error

Variable might not have been initialized error

When i try to compile this: public static Rand searchCount (int[] x) { int a ; int b ; ... for (int l= 0; l

How do I make a list of data frames?

How do I make a list of data frames?

How do I make a list of data frames and how do I access each of those data frames from the list?For example, how can I put these data frames in a list ?d1 <- data.frame(y1 = c(1, 2, 3), y2 = c(4, 5, 6))d2 <- data.frame(y1 =

Javascript infamous Loop issue? [duplicate]

Javascript infamous Loop issue? [duplicate]

This question already has an answer here: JavaScript closure inside loops – simple practical example 35 answers I've got the following code snippet. fu

Android NDK overflows dalvik JNI local reference table

Android NDK overflows dalvik JNI local reference table

I have the following problem, from c++ I send huge string[] to java. huge = at most 20 rows; I am doing the following jint jtype = 2;jstring emptyString = env->NewStringUTF("");jobjectArray data = (jobjectArray)env->NewObjectArray(7, env->F

Error inflating class android.webkit.WebView happens sporadically in production

Error inflating class android.webkit.WebView happens sporadically in production

my application is on Google Play and it runs fine on most of devices (thousands of users). But in rare cases (fraction of percent of daily active users) I get Error inflating class android.webkit.WebView when I inflate layout for my fragmen

objective C underscore property vs self

objective C underscore property vs self

I'm was playing around with the standard sample split view that gets created when you select a split view application in Xcode, and after adding a few fields i needed to add a few fields to display them in the detail view.and something inte

opengl glutmainloop()

opengl glutmainloop()

i just started off using OpenGL and it seems it is not easy to understand the working of the glutMainLoop() what really happens there? Does it stay there doing nothing till any of the function calls responds? 1:It calls your display call

Get reference to Thread Object from its ID

Get reference to Thread Object from its ID

How can I get reference to a Running Thread if I know the ID associated with that Thread?e.g.long threadID = 12342;Thread thread = (What goes here?) getThreadFromId(threadID); //I know this is totally made up 1:You have 2 ways to do it.B

How can I check if I'm on the last element when iterating using foreach syntax [duplicate]

How can I check if I'm on the last element when iterating using foreach syntax [duplicate]

This question already has an answer here: Printing lists with commas C++ 23 answers For example:for( auto &iter: item_vector ) { if(not_on_the_last

Can I peek on a BufferedReader?

Can I peek on a BufferedReader?

Is there a way to check if in BufferedReader object is something to read? Something like C++ cin.peek(). Thanks. 1:You can try the "boolean ready()" method.From the Java 6 API doc: "A buffered character stream is ready if the buffer is n

Delete all objects in a list

Delete all objects in a list

I create many object then I store in a list. But I want to delete them after some time because I create news one and don't want my memory goes high (in my case, it jumps to 20 gigs of ram if I don't delete it).Here is a little code to illus

“too many automatic redirections were attempted” error message when using a httpWebRequest in .NET

“too many automatic redirections were attempted” error message when using a httpWebRequest in .NET

I am attempting to request a page like "http://www.google.com/?q=random" using the webrequest class in vb.net.we are behind a firewall, so we have to authenticate our requests.I have gotten past the authentication part by adding my credenti

Python: finding lowest integer

Python: finding lowest integer

I have the following code:l = ['-1.2', '0.0', '1']x = 100.0for i in l: if i The code should find the lowest value in my list (-1.2) but instead when i print 'x' it finds the value is still 100.0Where is my code going wrong? 1:To find

How can I convert List to Hashtable in C#?

How can I convert List to Hashtable in C#?

I have a list of objects, each containing an Id, Code and Description.I need to convert this list into a Hashtable, using Description as the key and Id as the value.This is so the Hashtable can then be serialised to JSON.Is there a way to c

python pandas flatten a dataframe to a list

python pandas flatten a dataframe to a list

I have a df like so:import pandasa=[['1/2/2014', 'a', '6', 'z1'], ['1/2/2014', 'a', '3', 'z1'], ['1/3/2014', 'c', '1', 'x3'], ]df = pandas.DataFrame.from_records(a[1:],columns=a[0])I want to flatten the df so it is one cont

PMD: Avoid instantiating new objects inside loops

PMD: Avoid instantiating new objects inside loops

I've got an issue with the PMD rule Avoid instantiating new objects inside loops. Here is some example code:import java.awt.Dimension;public class PMDDemo { public static void main(final String[] args) { final Dimension[] arr = ne

How do I read a delimited file with strings/numbers with Octave?

How do I read a delimited file with strings/numbers with Octave?

I am trying to read a text file containing digits and strings using Octave. The file format is something like this:A B Ca 10 100b 20 200c 30 300d 40 400e 50 500but the delimiter can be space, tab, comma or semicolon. The textread function w

How can I get MIME type of an InputStream of a file that is being uploaded?

How can I get MIME type of an InputStream of a file that is being uploaded?

Simple question: how can I get MIME type (or content type) of an InputStream, without saving file, for a file that a user is uploading to my servlet? 1:It depends on where you are getting the input stream from. If you are getting it from

Timer.scheduledTimer swift 3 pre iOS 10 compatibility

Timer.scheduledTimer swift 3 pre iOS 10 compatibility

I need to schedule a Timer for firing a function every second but I see that in xcode 8 beta 3 the scheduledTimer is only available for iOS 10. Is there any alternative for using the timer in iOS 9 or previous versions?Timer.scheduledTimer(

How to add multiple divs with appendChild?

How to add multiple divs with appendChild?

I am trying to make a chessboard using javascript and creating 64 divs with it.The problem is, that it creates only the first div.Here is the code:div { width: 50px; height: 50px; display: block; position: relative; float: le

How to merge array and preserve keys?

How to merge array and preserve keys?

I have two arrays:$array1 = array('a' => 1, 'b' => 2, 'c' => 3);$array2 = array('d' => 4, 'e' => 5, 'f' => 6, 'a' => 'new value', '123' => 456);I want to merge them and keep the keys and the order and not re-index!!How to get like this?A

Ajax in magento (load product view block)

Ajax in magento (load product view block)

What I want to achieve:Clicking on a product link/image (at least in certain areas) to open a pop-up with the full product information (basically all the contents of the product view page).What I did/tried so far:created all the stuff outsi

Gnuplot workflow involving loops of fits that get multiplotted

Gnuplot workflow involving loops of fits that get multiplotted

I want to do the following in gnuplot:read my files, which are conveniently labeled "filenameN.txt", where N is the Nth file.Fit some polynom fN(x)to the data, using aN, bN,...and plot all of those in a single graphic (multiple plots) using

How to create an array from this result set (nested categories stored in databased with traversal mo

How to create an array from this result set (nested categories stored in databased with traversal mo

Based on this question: Getting a modified preorder tree traversal model (nested set) into a The logic bellow is used to build an ordered list, but how to do the same with an array? I want to build a nested array.// bootstrap loop$result =