Yammer tenant tenant Migration – SharePoint Stack Exchange


Your privacy


By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.




Fizzbuzz in C lang – Code Review Stack Exchange

 #define EXIT_SUCCESS 0

You are not permitted to define standard library names yourself. So just include <stdlib.h>, or omit the return from main() (remember, C will provide a success return if you don’t provide one).

void fizzbuzz(int n) {

We could give that internal linkage:

static void fizzbuzz(int n) {
char result(9) = "";  // strlen("fizzbuzz") + 1 == 9

Instead of manually calculating, we could use sizeof "fizzbuzz" to let the compiler do that for us.

    if (!*result) sprintf(result, "%d", n);

We should be using snprintf() here, as the decimal representation of n can be longer than result has capacity for (even on common platforms with 32-bit int).

I would avoid writing to result in this case – we can format directly to stdout:

    if (*result) {
        puts(result);
    } else {
        printf("%dn", n);
    }

main should be specific about its arguments:

 int main(void)

#include <stdio.h>
#include <string.h>

void fizzbuzz(int n)
{
    char result(sizeof "fizzbuzz") = "";
    if (n % 3 == 0) { strcat(result, "fizz"); }
    if (n % 5 == 0) { strcat(result, "buzz"); }
    if (*result) {
        puts(result);
    } else {
        printf("%dn", n);
    }
}

int main(void)
{
    for (int i = 1;  i <= 100;  ++i) {
        fizzbuzz(i);
    }
}

web browser – A runtime sometimes converts string arguments (or string returns) from WTF-16 to UTF-16 between functions in a call stack. Is this a security concern?

For example, suppose we have this code (in TypeScript syntax):

function one(str: string): string {
  // do something with the string
  return str
}

function two() {
  let s = getSomeString() // returns some unknown string that may contain surrogates
  s = one(s)
  // ...
}

two()

Now suppose that when passing the string s into the one(s) call, the runtime (not the implementation of one or two will sometimes replace part of the string. In particular, this will happen when there are WTF-16 “isolated surrogates”, but the main idea here is that this is not common and most developers will not be aware that this happens… until it happens.

Now, suppose this never happened before, but the runtime recently added this format conversion between function calls (converting function arguments or their return values without the implementation of any function having a choice in the matter).

In such a runtime, could there be a security issue after the runtime has switched from never changing strings to now doing it sometimes? If so, what could happen?


In particular, the runtime I am thinking about is JavaScript interfacing with WebAssembly in the browser in the potential near future if the new “Interface Types” proposal passes a vote for string passing to have WTF-to-UTF sanitization.

What I could imagine, for example, is some third party library updating an implementation of one or more of their functions from JavaScript to WebAssembly, this in turn causing strings being passed from JS to WebAssembly (or vice versa) to be modified from their original form, causing unexpected errors, or in the worst case, a vulnerability.

Is there a potential problem here?

Photo Competition 2021-07-26: Music – Photography Stack Exchange

Theme: Music

Either literal (instruments, musicians, performance) or figurative (geometric or natural patterns which evoke the patterns of music).

This theme was suggested by mattdm.

Voting Rules

  • View the submissions sorted by active to give every submitter a fair chance
  • Vote up as many images as you like
  • Please, up votes only! Do NOT vote down your competitors! If you don’t like an image, don’t vote
  • Voting closes on August 9, 2021 at 12:01 AM UTC (00:01 UTC if you prefer a 24-hour time). The winner will be chosen based on votes at that time.

Submission Rules

  1. One photo submission per answer. Up to three (3) entries allowed.
  2. Post only photos taken by yourself or the person with you.
  3. All entries should include:
    • a title for the photo
    • a location and date, if known
    • camera, lens, and exposure settings, if known
    • any other explanatory notes, comments, etc., that you want to include (completely optional)
  4. The submitted image must conform to this site’s content license, Creative Commons Attribution-ShareAlike 4.0 (CC BY-SA 4.0) with attribution required.
  5. Do not use this as a forum for photo critique. Use chat instead, or ask a new question about your image.

Next Contest

Suggest a theme by writing a new answer at the Photo of the Week Theme Ideas thread. Please make sure to check the PotW theme ideas Archive first, to make sure you aren’t recycling a theme.

The highest-voted theme will be the next theme.

Good luck!

PYTHON RUNNING ERRORS – Computer Science Stack Exchange

PYTHON RUNNING ERRORS – Computer Science Stack Exchange

Meetup group 2nd strike – Web Applications Stack Exchange

Meetup group 2nd strike – Web Applications Stack Exchange

Issue with WORDPRESS MULTISITE – WordPress Development Stack Exchange

Step by step Im fallow to guide:
https://multilingualpress.org/docs/how-to-install-wordpress-multisite/

I have crated additional website:
enter image description here

Main website working. Only issue with this new both.

Also I add DNS A record to DirectAdmin and CloudFlare etc.

after run our new site with subdomain example
de.mymynewsite.com I get issue:
Apache is functioning normally

propagation had to take place. So can anyone give a hint?

Inheritance in java – Software Engineering Stack Exchange

Inheritance in java – Software Engineering Stack Exchange

php fpm – Can’t connect WordPress and MariaDB on LAMP stack with docker-compose

I’m new here and that’s my 1st question so tell me if anything is wrong in the way I put it.

So here’s the problem: I’m building a LAMP stack with 3 separate containers for nginx, maiadb and wordpress.

The whole nginx and php-fpm seems to work well, as I can access the site’s index and process php pages. Mdb builds the wordpress db and creates a “wordpress@wordpress-php” user with all privileges on it.

It starts to go wrong when I access the site for installation, I get stuck with a : “Error establishing a database connection”

Here is my wp-config.php, that I copy in the wordpress dir inside the container:

 15 define( 'DB_HOST', 'mariadb' );                                                                                                                                                      
 16 define( 'DB_CHARSET', 'utf8' );                                                 
 17                                                                                              
 19 define( 'DB_COLLATE', '' );                                                     
 20 define('AUTHOR', 'yotillar');                                                   
 21                                                                                 
 22 // Authentication unique keys and salts.                                        
 23 define( 'AUTH_KEY',         'key' );
 24 define( 'SECURE_AUTH_KEY',  'key' );
 25 define( 'LOGGED_IN_KEY',    'key' );
 26 define( 'NONCE_KEY',        'key' );
 27 define( 'AUTH_SALT',        'salt' );                                    
 28 define( 'SECURE_AUTH_SALT', 'salt' );
 29 define( 'LOGGED_IN_SALT',   'salt' );
 30 define( 'NONCE_SALT',       'salt' );
 31                                                                                                               
 38 $table_prefix = 'wp_';               

Here’s my docker-compose.yaml:

version: "3.5"                                                                  
  2                                                                                 
  3 networks:                                                                       
  4   front-network:                                                                
  5     driver: bridge                                                              
  6     attachable: false                                                           
  7   back-network:                                                                 
  8     driver: bridge                                                              
  9     attachable: false                                                           
 10                                                                                 
 11 volumes:                                                                          
 12   mdb-data:                                                                     
 13   wordpress:                                                                    
 14                                                                                 
 15 services:                                                                       
 16                                                                                 
 17   nginx:                                                                        
 18     depends_on:                                                                 
 19       - wordpress-php                                                           
 20     build: "./services/nginx"                                                   
 21     image: nginx:mytag                                                          
 22     volumes:                                                                    
 23       - wordpress:/var/www/myserver/wordpress:rw                                
 24       - "../logs/nginx_logs:/var/log/nginx:rw"                                  
 25     restart: on-failure                                                         
 26     ports:                                                                      
 27       - "80:80"                                                                 
 28       - "443:443"                                                               
 29     expose:                                                                     
 30       - 9000                                                                    
 31     networks:                                                                   
 32       - front-network                                                           
 33                                                                                 
 34                                                                                 
 35   wordpress-php:                                                                
 36     depends_on:                                                                 
 37       - mariadb                                                                 
 38     build: "./services/wordpress"                                               
 39     image: wordpress-php:mytag                                                  
 40     volumes:                                                                    
 41       - wordpress:/var/www/myserver/wordpress:rw                                
 43     restart: on-failure                                                         
 44     environment:                                                                
 45       - WORDPRESS_DB_HOST=mariadb:3306                                          
 46       - WORDPRESS_DB_NAME=wordpress                                             
 45       - WORDPRESS_DB_USER=wordpress                                             
 48       - WORDPRESS_DB_PASSWORD=wordpress                                                                                      
 50     expose:                                                                     
 51       - 3306                                                                    
 52       - 9000                                                                    
 53     networks:                                                                   
 54       - front-network                                                           
 55       - back-network                                                            
 56                                                                                 
 57                                                                                 
 58   mariadb:                                                                      
 59     build: "./services/mariadb"                                                 
 60     image: mariadb:mytag                                                        
 61     volumes:                                                                    
 62       - mdb-data:/var/lib/mysql:rw                                              
 63       - "../logs/mariadb_logs/error.log:/var/log/mysql/error.log"               
 64     restart: on-failure                                                         
 65     environment:                                                                
 66       - MYSQL_DATABASE=wordpress                                                
 67       - MYSQL_USER=wordpress                                                    
 68       - MYSQL_USER_PASSWORD=wordpress                                           
 69       - MYSQL_ROOT_PASSWORD=root                                                
 70     expose:                                                                     
 71       - 3306                                                                    
 72     networks:                                                                   
 73       - back-network                                                            
 74                                                                                 

I set the bind-address of mariadb on 0.0.0.0 in ./etc/mysql/mariadb.conf.d/50-se rver.cnf and ./etc/mysql/my.cnf to be sure that th db is indeed listening from every ip.

I think the problem comes from the wp-config.php , but as I understood in a docker-compose environment you can refer to each container with his name instead of ip, and I don’t know how I could retrieve mariadb’s IP from wordpress-php.

Please help me,
Thank in advance to anyone that read that far! ^^

Block Controls not showing – WordPress Development Stack Exchange

I’m building my first Gutenberg block and the problem that I have is that the block control toolbar doesn’t show.
I’ve spend hours comparing my code with other Gutenberg blocks, but couldn’t find what is wrong in my code.
I would highly appreciate if someone could look at my code and advice.

Here is my code:

import { registerBlockType } from '@wordpress/blocks';
import { 
    RichText,
    InspectorControls,
    ColorPalette,
    MediaUpload
        } from '@wordpress/block-editor';
import { 
    PanelBody,
    IconButton } from '@wordpress/components';
 
registerBlockType( 'luxworx-blocks/author-block', {
    apiVersion: 2,
    title: 'Luxworx: Author Block',
    icon: 'universal-access-alt',
    category: 'design',
    example: {},
    attributes: {
        title: {
            type: 'string',
            source: 'html',
            selector: 'h2'
        },
        body: {
            type: 'string',
            source: 'html',
            selector: 'p'
        },
        textColor: {
            type: 'string',
            default: 'black'
        },
        bgColor: {
            type: 'string',
            default: 'white'
        },
        authorImage: {
            type: 'string',
            default: null
        }
    },

    edit( {attributes, setAttributes}) {

        // Custom functions
        function updateTitle (newTitle) {
            setAttributes( { title: newTitle}) 
        }
        function updateBody (newBody) {
            setAttributes( { body: newBody}) 
        }
        function onTextColorChange (newColor) {
            setAttributes( {textColor: newColor})
        }
        function onBgColorChange (newColor2) {
            setAttributes( {bgColor: newColor2})
        }
        function onSelectImage(newImage) {
            setAttributes( {authorImage: newImage.sizes.full.url })
        }
 
        return (
            <InspectorControls key="lx-authors-block-setting" style={ { marginBottom:'40px'} }>
                <PanelBody title={ 'Color setting' }>
                    <p><strong>Select text color:</strong></p>
                    <ColorPalette value={ attributes.textColor }
                                    onChange={ onTextColorChange } />
                    <p><strong>Select block bacground color:</strong></p>
                    <ColorPalette value={ attributes.bgColor }
                                    onChange={ onBgColorChange } />
                </PanelBody>
                <PanelBody title={ 'Author image'}>
                    <p><strong>Select author image:</strong></p>
                    <MediaUpload
                        onSelect={ onSelectImage }
                        type="image"
                        value={ attributes.authorImage }
                        render={ ( { open } ) => (
                            <IconButton
                                onClick={ open }
                                icon="upload"
                                className="editor-media-placeholder__button button is-default">
                                Author Image
                            </IconButton>
                        ) } />
                        
                </PanelBody>
            </InspectorControls>,
            <div className="lx-authors-block wp-block" key="container" style={{ backgroundColor: attributes.bgColor}}>
                <img src={ attributes.authorImage} className="lx-authors-image" />
                <div className="lx-author-info">
                    <RichText   
                                placeholder="Authors name"
                                tagName="h2"
                                value={attributes.title}
                                onChange={updateTitle}
                                style={ {color: attributes.textColor }} />
                    
                    <RichText  
                                placeholder="Authors bio"
                                tagName="p"
                                value={attributes.body}
                                onChange={updateBody}
                                style={ {color:attributes.textColor}} />
                </div>
            </div> 
        );
    },
    save( {attributes}) {
        
        return (
            <div className="lx-authors-block wp-block" style={{ backgroundColor: attributes.bgColor }}>
                <img src={ attributes.authorImage} className="lx-authors-image" />
                <div className="lx-author-info">
                    <h2 style={ { color: attributes.textColor }}>{attributes.title}</h2>
                    <RichText.Content tagName="p"
                                    value={attributes.body}
                                    style={ {color:attributes.textColor}}
                                    />
                </div>
            </div>
        );
    },
} );

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies 5000 Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive.com Proxies-free.com New Proxy Lists Every Day Proxies123.com Buy Cheap Private Proxies; Best Quality USA Private Proxies