Can a webpage differ in content if ‘http’ is changed to ‘https’ or if ‘www.’ is added after ‘http://’ (or ‘https://’)?

When I use the Python package newspaper3k package and run the code

import newspaper paper ='', memoize_articles=False) for url in paper.article_urls():     print(url) 

I get a list of URLs for articles that I can download, in which both these URLs exist


As can be seen, the only difference between the two URLs is the s in https.

The question is, can the webpage content differ simply because an s is added to http? If I scrape a news source (in this case, do I need to download both articles to be sure I don’t miss any article, or are they guaranteed to have the same content so that I can download only one of them?

I have also noticed that some URLs also are duplicated by adding www. after the http:// (or https://). I have the same question here: Can this small change cause the webpage content to differ, and is this something I should take into account or can I simply ignore one of these two URLs?

Libgdx – TextButtons added to Table – clicklistener not working [closed]

I am having issues trying to implement a menu in a previously created game. I am pretty new to Libgdx and not sure how everything works just yet. I am adding a menu to an already created game scene using a table and text buttons.

My goal:

  1. Click button which shows table full of buttons
  2. Click specific table button and do something with them
  3. Click away from the table area then table/buttons will disappear

I’ve got it all working except connecting the buttons to clicklisteners. I can only think of the buttons not actually being on the top surface where you can click them.

Section of code: Shortened for brevity; class implements InputProcessor

    protected MenuComponent(GameContext context, SeaBattleScene owner) {         super(context, owner);         this.context = context;     }      @Override     public void create() {         batch = new SpriteBatch();         this.stage = new Stage();         Gdx.input.setInputProcessor(stage);         menuUp = new Texture("assets/ui/disengage.png");         menuDown = new Texture("assets/ui/disengagePressed.png");         menuWindow = createMenuWindow();         menuWindow.setVisible(false);         stage.addActor(menuWindow);         stage.getRoot().setPosition(65,150);     }      @Override     public void update() {     }      @Override     public void render() {         batch.begin();         batch.draw((menuButtonIsDown)?menuDown:menuUp, MENU_buttonX, MENU_buttonY);         batch.end();         stage.act();         stage.draw();     }     private Table createMenuWindow() {         //Table View         Table table = new Table();         table.setPosition(675,160);         //Button View         SpriteDrawable upFormat=new SpriteDrawable(new Sprite(createRoundPixMap(Color.BLACK,100, 30,10)));         SpriteDrawable downFormat=new SpriteDrawable(new Sprite(createRoundPixMap(Color.BLACK,100, 30,10)));         SpriteDrawable checkedFormat=new SpriteDrawable(new Sprite(createRoundPixMap(Color.BLACK,100, 30,10)));         TextButtonStyle buttonStyle=new TextButtonStyle(upFormat, downFormat, checkedFormat, new BitmapFont());         //Individual Buttons         TextButton lobbyButton = new TextButton("Back to Lobby",buttonStyle);         lobbyButton.addListener( new ClickListener() {                           public void clicked(InputEvent event, float x, float y) {                 System.out.println("Clicked");             };         });         TextButton mapButton = new TextButton("Show Maps",buttonStyle);         table.add(lobbyButton).pad(3,0,3,0).row();         table.add(mapButton).pad(3,0,3,0).row();         return table;     }           public static Texture createRoundPixMap(Color color, int width,             int height, int cornerRadius) {         Pixmap pixmap = new Pixmap(width, height, Pixmap.Format.Alpha);         pixmap.setBlending(Pixmap.Blending.None);         pixmap.setColor(color.r,color.g,color.b,0.4f);         pixmap.fillCircle(cornerRadius, cornerRadius, cornerRadius);         pixmap.fillCircle(width - cornerRadius, cornerRadius, cornerRadius);         pixmap.fillCircle(width - cornerRadius, height - cornerRadius, cornerRadius);         pixmap.fillCircle(cornerRadius, height - cornerRadius, cornerRadius);         pixmap.fillRectangle(0, cornerRadius, width, height - (cornerRadius * 2));         pixmap.fillRectangle(cornerRadius, 0, width - (cornerRadius * 2), height);         Texture texture = new Texture(pixmap);         pixmap.dispose();         return texture;     } 

Can someone expain or show me what I am doing wrong, so I can fix it to where I can use the buttons?

This is basically what it looks like: Menu

Woocommerce redirection to checkout for certain after product added to cart

I have implement this code in function.php to redirect the page to checkout if product with id(26285) added to the cart .This is the code

add_action( 'woocommerce_add_to_cart', 'custom_add_to_cart', 1, 2 ); function custom_add_to_cart( $  cart_item_key, $  product_id ) {  $  site_url = get_site_url(); if($  product_id == 26285) {  // Redirecting to some url wp_redirect($  site_url.'/my-account/'); exit; }} 

the condition i need to satisfy here is , if the product with ID:26285 added to the cart i need to redirect to checkout.The problem i am facing now is the page is redirecting but the product was not adding to cart . How to achive that?

Your help will very much appreciated. Have a nice day!

I am unable to understand the logic behind the code (I’ve added exact queries as comments in the code)

Our local ninja Naruto is learning to make shadow-clones of himself and is facing a dilemma. He only has a limited amount of energy (e) to spare that he must entirely distribute among all of his clones. Moreover, each clone requires at least a certain amount of energy to function (m) . Your job is to count the number of different ways he can create shadow clones. Example:


ans = 4

The following possibilities occur: Make 1 clone with 7 energy

Make 2 clones with 2, 5 energy

Make 2 clones with 3, 4 energy

Make 3 clones with 2, 2, 3 energy.

Note: <2, 5> is the same as <5, 2>. Make sure the ways are not counted multiple times because of different ordering.


int count(int n, int k){     if((n<k)||(k<1)) return 0;     else if ((n==k)||(k==1)) return 1;     else return count(n-1,k-1)+ count(n-k,k);   // logic behind this? }  int main() {     int e,m;            // e is total energy and m is min energy per clone     scanf("%d %d", &e, &m);     int max_clones= e/m;     int i,ans=0;     for(i=1;i<=max_clones;i++){         int available = e - ((m-1)*i);   // why is it (m-1)*i instead of m*i         ans += count(available, i);     }     return 0; } 

not posting to links that i manually added

i added some links that were created manually and did :-

project>data>edit button (on top right next to url)>import>from clipboard

urls created show in url list

it also has urls from the above tier (tier 1)
it has created posts for the urls on tier 1, but not a single one for the urls added manually.
on – project>data> edit tier filter options button
it is set to -urls age in days – 7-120
it is about a month since i added the links manually although they were created before that.
its creating links for the tier above, but not the links added manually
it has the 2 boxes ticked at the top of “data” in the project
“use a random url from above on every submission” (this is where the added urls are)
“use verified urls -of tier one profiles”

Do Bloodline bonus spells known need to be added to the class that qualified you for the feat?

Bloodline feats (e.g. Air Bloodline) grant additional spells known, and require you to be a spontaneous arcane caster.

But are these spells known only added to the class that qualifies you for the feat? Could you add some or all of the spells known to a different class’s spell list (e.g. Sha’ir, for a prepared caster that still needs to learn spells), instead of or in addition to your (e.g.) sorcerer spell list?

I don’t actually have the Dragon Compendium, so I’m stuck with D&D tools as a reference. If the answer to this question is spelled out clearly and obviously in Dragon Compendium, I apologize.

Unity C# XML Serialization broke when abstract base type is added

I had a menu system with 4 different item types instantiated from one XML file. I had always intended to build an abstract base class for them to inherit from, after I knew what the common elements would be. When I wrote the simple base class, and assigned the 4 existing items as derived classes, everything broke! The GameObjects with my instantiator scrips kick this error, now:

InvalidOperationException: To be XML serializable, types which inherit from IEnumerable must have an implementation of Add(System.Object) at all levels of their inheritance hierarchy. UnityEngine.Transform does not implement Add(System.Object) 

I read a lot about why it could happen, but like I said, it wasn’t happening until I build a new, very simple abstract class for the items to inherit from.
Any help understanding “why” would be awesome!

Is this added versatility to the Sorcerer’s Flexible Casting imbalancing?

After playing Sorcerer quite a bit (both spell-slot and spell-point versions) I feel that the spell-slot variety lacks much of the versatility granted under the spell-point option. I’m wondering whether the following change (increase in versatility) to the Flexible Casting feature will be alright or if I’ve missed something that will horribly imbalance my games.

The current Flexible Casting feature allows you to turn a spell slot into a number of sorcery points equal to its level and you can convert a number of sorcery points into a spell slot following this table:

$ $ \begin{array}{|c|c|} \hline \text{SPELL SLOT LEVEL} & \text{SORCERY POINT COST} \ \hline \text{1st} & \text{2} \ \hline \text{2nd} & \text{3} \ \hline \text{3rd} & \text{5} \ \hline \text{4th} & \text{6} \ \hline \text{5th} & \text{7} \ \hline \end{array} $ $

However, I found this particularly lacking when it comes to spells that don’t significantly change when upcast (such as misty step). Thus I wanted there to be a way to turn these larger spell slots into smaller ones and propose the following addition to Flexible Casting:

As a bonus action, you may convert a spell slot of 5th level or lower into any combination of spell slots so long as the sum of their levels is less than the original slot.

For example, a 4th level slot could become a 3rd level slot, a 2nd level slot and a 1st level slot, or three 1st level slots.

Notably, converting a slot into sorcery points is always worth more than converting the slots you make out of it because of the sum having to be lower than the original slot’s level. (If you make a 4th level slot and convert it into different spell slots, you couldn’t earn back more than 3 sorcery points)

Also the cost of creating the composite slots is usually less than or equal to the cost of creating the larger slot. This means you couldn’t gain bonus slots. (Making three 1st level slots costs 6 points, and making a 4th level slot, which can be turned into three 1st level slots, also costs 6 points).
The only exception to this is that a 5th level slot can be turned into four 1st level slots, which would ordinarily cost 8 sorcery points, but now would only cost 7. I’m not particularly worried about this one instance of a price mis-match though.

Something like the following is what I’m currently worried about:
Converting a 5th level slot into four 1st level slots to cast catapult four times. Cast at 5th level, catapult would deal 7d8 damage, but now it can be split into four instances of 3d8 damage (a total of 12d8). This deals 5d8 more damage than the previous version, though it requires 3 more actions, and a bonus action. Alternatively you could create two 2nd level slots dealing only 8d8 damage, costing an additional action and a bonus action. I’m unsure how balanced these damage differences in particular are though.

Is some part of this proposed change to Flexible Casting going to imbalance my game?