Football Cup Serbia: Upcoming Matches and Expert Betting Predictions
The Football Cup Serbia is set to captivate fans with its thrilling matches tomorrow. As the excitement builds, let's delve into the lineup of matches and explore expert betting predictions that could guide your wagers. Whether you're a seasoned bettor or new to the game, understanding the dynamics of each match can enhance your experience.
Match Lineup for Tomorrow
  - Red Star Belgrade vs. Partizan: This classic derby is always a highlight, with both teams eager to assert their dominance. Red Star's strong home advantage and recent form make them favorites, while Partizan's resilience could surprise many.
- Voždovac vs. Rad: A crucial encounter for both teams looking to climb the league table. Voždovac's defensive solidity will be tested against Rad's attacking prowess.
- Napredak vs. Novi Pazar: A battle of mid-table teams with aspirations of finishing higher. Napredak's recent improvement in form gives them a slight edge.
- Javor vs. Čukarički: Both teams are fighting to avoid relegation, making this match a must-win situation for both sides.
Expert Betting Predictions
  Red Star Belgrade vs. Partizan
  The rivalry between Red Star and Partizan is legendary, making this match one of the most anticipated in Serbian football. Experts predict a high-scoring game due to the offensive capabilities of both teams.
  
  
    - Betting Tip: Over 2.5 goals – Both teams have strong attacking lines, making a goal-rich match likely.
- Red Star Win: With home advantage and recent form, Red Star is favored to secure a victory.
Voždovac vs. Rad
  This match promises a tactical battle, with Voždovac focusing on defense and Rad looking to exploit any weaknesses.
  
  
    - Betting Tip: Under 2.5 goals – Voždovac's solid defense could stifle Rad's attacks, leading to a low-scoring affair.
- Draw: Given the balanced nature of the teams, a draw is a plausible outcome.
Napredak vs. Novi Pazar
  Napredak's recent resurgence makes them the favorites against Novi Pazar, who are struggling with consistency.
  
  
    - Betting Tip: Napredak to win – Their improved form positions them well to take all three points.
- Napredak BTTS (Both Teams To Score): With both teams having capable strikers, goals from both sides are expected.
Javor vs. Čukarički
  A relegation battle that could determine the fate of both teams. Javor will look to capitalize on home support, while Čukarički aims to pull off an upset.
  
  
    - Betting Tip: Javor to win – Home advantage and the need for points make Javor the more likely victor.
- Over 1.5 goals: The desperation for points could lead to an open game with plenty of chances.
In-Depth Analysis: Key Players and Tactics
Understanding key players and tactical approaches can provide deeper insights into potential match outcomes. Here’s a closer look at pivotal figures and strategies that might influence tomorrow’s games.
  Red Star Belgrade
  Key Player: Aleksandar Pešić – Known for his leadership and scoring ability, Pešić will be crucial in breaking down Partizan’s defense.
  Tactics: Red Star typically employs an aggressive pressing style, aiming to control possession and create scoring opportunities through quick transitions.
  Partizan
  Key Player: Marko Gobeljić – His versatility allows him to adapt to various roles, making him a threat in attack and midfield.
  Tactics: Partizan often focuses on solid defense and counter-attacks, looking to exploit any gaps left by their opponents’ pressing game.
  Vojvodina (Voždovac)
  Key Player: Stefan Stojanović – As a central defender, his ability to read the game will be vital in neutralizing Rad’s forwards.
  Tactics: Voždovac relies on maintaining a compact shape, absorbing pressure, and hitting on the break through swift counter-attacks.
  Rad
  Key Player: Milan Đurić – His creativity in midfield can unlock defenses and set up crucial chances for Rad’s attackers.
  Tactics: Rad prefers an attacking approach, using pace on the wings to stretch defenses and create space for their forwards.
  Napredak
  Key Player: Nikola Stojiljković – His leadership and knack for scoring important goals make him indispensable for Napredak’s ambitions.
  Tactics: Napredak has shifted towards a more balanced approach, focusing on defensive solidity while exploiting set-pieces as attacking opportunities.
  Novi Pazar
  Key Player: Nemanja Stevanović – His experience and aerial ability are crucial in both defense and attack for Novi Pazar.
  Tactics: Novi Pazar often plays with a high defensive line, aiming to disrupt opponents’ build-up play and capitalize on counter-attacks.
  Javor Ivanjica
  Key Player: Uroš Matić – Known for his work rate and technical skills, Matić can influence the game from midfield positions.
  Tactics: Javor typically employs a possession-based style, focusing on controlling the tempo of the game and creating chances through intricate passing combinations.
  Čukarički
weijunjun1988/mytools<|file_sep|>/php/analysis.php
 $value) {
		$sum = array_sum($value);
		$count = count($value);
		if ($count >0) {
			$avg[$key] = $sum / $count;
		}
	}
	return $avg;
}
function get_max_price($arr)
{
	$max = array();
	foreach ($arr as $key => $value) {
		sort($value);
		$max[$key] = end($value);
	}
	return $max;
}
function get_min_price($arr)
{
	$min = array();
	foreach ($arr as $key => $value) {
		sort($value);
		$min[$key] = reset($value);
	}
	return $min;
}
function get_change_percent($avg_price,$prev_avg_price)
{
	if (empty($prev_avg_price)) {
		return 'N/A';
	}
	
	return number_format(((float)$avg_price - (float)$prev_avg_price) / (float)$prev_avg_price *100 ,2).'%';
}
function get_all_prices_from_db()
{
	include 'config.php';
	try {
		
	    // Instantiate the client.
	    $client = new Google_Client();
	    $client->setApplicationName('Google Sheets API PHP Quickstart');
	    $client->setScopes([Google_Service_Sheets::SPREADSHEETS]);
	    $client->setAuthConfig(__DIR__ . '/credentials.json');
	    $client->setAccessType('offline');
	    // Load previously authorized credentials from a file.
	    $credentialsPath = expandHomeDirectory(__DIR__ . '/credentials.json');
	    if (file_exists($credentialsPath)) {
	        $accessToken = json_decode(file_get_contents($credentialsPath), true);
	    }
	    // If there is no previous token or it's expired.
	    if (empty($accessToken) || isset($accessToken['expire_time']) && $accessToken['expire_time'] <= time()) {
	        if ($client->isAccessTokenExpired()) {
	            // Refresh the token if possible.
	            if ($client->getRefreshToken()) {
	                $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());
	            } else {
	                // Request authorization from the user.
	                throw new Exception("No refresh token available.");
	            }
	        }
	        // Save the credentials for the next run.
	        if (!file_exists(dirname($credentialsPath))) {
	            mkdir(dirname($credentialsPath),0700,true);
	        }
	        file_put_contents($credentialsPath,json_encode($client->getAccessToken()));
	    }
	    // Create authorized API client.
	    $service = new Google_Service_Sheets($client);
	    // Read data from spreadsheet
	    
	    $spreadsheetId = '1Cjy7Vejyqz9GUXeK-Lg6Lx9fVYR2JFAM6JL2n0mOMRk';
	    
	    // Call Sheets API
	    $range = 'Sheet1!A2:E';
	    $response = $service->spreadsheets_values->get($spreadsheetId,$range);
	    
	    
	    return json_decode(json_encode(array_column((array)$response->values,'price')),true);
	
	} catch (Exception $e) {
	
	  print "An error occurred: " . $e->getMessage();
	  exit;
	
	}
}
function get_all_prices()
{
	if (!isset($_GET['sheet_id'])) {
		
    	echo '';
    	
    	exit;
    	
    }
    
    return get_all_prices_from_db();
    
}
function get_monthly_avg_prices()
{
	$all_prices = get_all_prices();
	if (empty($all_prices)) {
		
    	echo 'No price data.';
    	
    	exit;
    	
    }
    
    foreach ($all_prices as &$price) {
    	
    	if (!empty($price)) {
    		list(,$date_str) = explode(' ',trim(str_replace('.','-',trim(trim(str_replace('/','-',$price),'price')))));
    		list(,$date_str) = explode('-',$date_str);
    		if (!isset($date_str[1])) {
    			continue;
    		}
    		if (strlen(trim(trim(str_replace('/','-',$price),'price'))) >10) {
    			list(,$time_str) = explode(' ',$date_str);
    			if (!isset($time_str[0])) {
    				continue;
    			}
    			list(,$time_str) = explode(':',$time_str[0]);
    			if (!isset($time_str[0])) {
    				continue;
    			}
    			if ((int)$time_str[0] >=12 && strlen(trim(str_replace('.','-',$time_str[0]))) ==1 ) {
    				continue;
    			}
    		}
    		if (strlen(trim(str_replace('.','-',$date_str))) !=8) {
    			continue;
    		}
    		list(,$year,$month,$day) = explode('-',$date_str);
    		if (!isset($year)) {
    			continue;
    		}
    		if (!isset($month)) {
    			continue;
    		}
    		if (!isset($day)) {
    			continue;
    		}
    		if (!is_numeric(trim(trim(str_replace('/','-',$price),'price')))) {
    			continue;
    		}
    		
    		
    		if (!isset($monthly_prices[$year])) {
    			
    			$monthly_prices[$year] = array();
    		
    		}
    		
    		if (!isset($monthly_prices[$year][$month])) {
    			
    			$monthly_prices[$year][$month] = array();
    		
    		}
    		
    		
    		
    		array_push(
    		
    			array_key_exists(trim(trim(str_replace('/','-',$price),'price'))?$year.'-'.$month.'-'.$day:$year.'-'.$month.'-01',
    		
    			                $monthly_prices[$year][$month])?
    		
    			                &$monthly_prices[$year][$month][trim(trim(str_replace('/','-',$price),'price'))?$year.'-'.$month.'-'.$day:$year.'-'.$month.'-01']:null,
    		
    				            trim(str_replace('.','',$price))
    		
    				            ),
    		
    				            
    				            &$monthly_prices[$year][$month][$year.'-'.$month.'-01']
    		
    				            );
    			
    			
    			
    			
    			
    			
    		
    			
    			
    			
    			
    			
    			
    		
    			
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    	
    }
    
    
    
    foreach ($monthly_prices as &$prices_per_year) {
    
        foreach ($prices_per_year as &$prices_per_month) {
        
            sort(array_keys(&$prices_per_month));
            
            foreach ($prices_per_month as &$daily_prices) {
            
            	sort(&$daily_prices);
            	
            	array_unshift(&$daily_prices,array_shift(&$daily_prices));
            	
            	
            }
            
        }
        
    }
    
    return get_avg_price(&$monthly_prices);
}
function get_yearly_avg_prices()
{
	
	return get_avg_price(get_monthly_avg_prices());
	
}
function analysis()
{
	
	echo '';
	
	echo '';
	
	echo '| ';
	
	echo ' | Avg Price USD/tonne (Monthly)';
	
	echo ' | % change from previous month (%)';
	
	echo ' | 
';
	
	
	foreach (&get_monthly_avg_prices() as &$avg_price => &$data_row) {
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
echo '';
echo '| '.$avg_price.'';
echo ' | '.number_format((float)$data_row ,2).'';
echo ' | '.get_change_percent((float)$data_row ,get_yearly_avg_prices()[substr((string)$avg_price ,0 ,4).'/'.$substr((string)$avg_price ,5 ,2)]).'';
echo ' | 
';
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
		
	
		
	
		
	
		
	
		
	
		
	
		
	
		
	
		
	
		
	
		
	
		
	
	
	
		
	
}
echo '
';
}
analysis();
?><|file_sep|>setApplicationName('Google Sheets API PHP Quickstart');
	    $client->setScopes([Google_Service_Sheets::SPREADSHEETS]);
	    $client->setAuthConfig(__DIR__ . '/credentials.json');
	    $client->setAccessType('offline');
	    // Load previously authorized credentials from a file.
	    $credentialsPath = expandHomeDirectory(__DIR__ . '/credentials.json');
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    
	    	
	    	
	    	
	    	
	    	
	    	
	    	
	    	
	    	
	    	
	    	
	    	
	    	
	    	
	    	
	    	
	    
 	    if (file_exists($credentialsPath)) {
	       
	       
	       /* 
	        
	        
	        
	        
	        
	        
	        
	        
	        
	         */
	        
	       /* 
	        
	        
	        
	        
	       
	       */
	        
	       /* 
	       
	       
	       
	        */
	        
	       /* 
	       
	       */
	       
	       /* 
	       
	       */
	       
	       /* 
	       
	       */
	       
	       /* 
	       
	       */
	       
	       /* 
	       
	       */
	       
	       /* 
	         */
	        
	      /*
	       */ 
	      /*
	       */
	      /*
	       */
	      /*
	       */
	      /*
	       */
	      /*
	         */
	        
	      /*
	       */
	      /*
	         */
	      /*
	         */
	      /*
	         */
	      /*
	          */
	      /*
	          */
	      /* 
	           */
	         
	      /*
	           */
	      /* 
	           */
	      /* 
	           */
	      /* 
	           */
	      /* 
	           */
	      /* 
	           */
	      /* 
	           */
	      /* 
	          */
		  // Get access token contents from file.
		  //
		  // This gets set in `handleAuth` below when we save credentials after going through OAuth flow.
		  //
		  // TODO: Add better error handling if this fails.
		  //
		  //
		  //
		  //
		  //
		  //
		  //
		  //
		  //
		  //
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  require_once __DIR__.'/vendor/autoload.php';
		  
		  
		  use GoogleClient;