This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Emicro\Bundle\CoreBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Symfony\Component\HttpFoundation\Request; | |
class LanguageSwitcherController extends Controller | |
{ | |
public function switchAction(Request $request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ALL); | |
ini_set('display_errors', 'On'); | |
$conn = oci_connect('system', 'manager', '192.168.1.4/xe'); | |
$stid = oci_parse($conn, 'select * from HR.GREETINGS'); | |
oci_execute($stid); | |
echo "<table>\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- http://www.sqlbook.com/scripts/AutoGenerateCRUDStoredProcs.txt | |
-- ######################################################### | |
-- Author: www.sqlbook.com | |
-- Copyright: (c) www.sqlbook.com. You are free to use and redistribute | |
-- this script as long as this comments section with the | |
-- author and copyright details are not altered. | |
-- Purpose: For a specified user defined table (or all user defined | |
-- tables) in the database this script generates 4 Stored | |
-- Procedure definitions with different Procedure name | |
-- suffixes: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; */ | |
time_zone := "+00:00"; | |
CREATE TABLE BACKOFFICEINFO ( | |
IID number(10) NOT NULL, | |
BACKOFFICENAME varchar2(255) NOT NULL, | |
BACKOFFICEADDRESS clob NOT NULL, | |
PRIMARY KEY (IID) | |
) ; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$conn = oci_connect('system', '12', '192.168.1.71/xe'); | |
$stid = oci_parse($conn, 'select * from BININFO'); | |
oci_execute($stid); | |
while (($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) != false) { | |
foreach ($row as $item) { | |
var_dump($item); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Merge Cell | |
$objPHPExcel->getActiveSheet()->mergeCells('A1:C1'); | |
#### Set Cell Widget | |
$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(10); | |
### Set Text Bold | |
// Full Cell | |
$objPHPExcel->getActiveSheet()->getStyle("A1")->getFont()->setBold(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function getAuthoritativeSportsRecords() | |
{ | |
$sql = " | |
SELECT name, | |
event_type, | |
sport_type, | |
level | |
FROM vnn_sport | |
"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo add-apt-repository ppa:webupd8team/java -y | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
--To automatically set up the Java 8 environment variables | |
sudo apt-get install oracle-java8-set-default | |
java -version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source http://stackoverflow.com/questions/12403662/how-to-remove-all-mysql-tables-from-the-command-line-without-drop-database-permi | |
SET FOREIGN_KEY_CHECKS = 0; | |
SET @tables = NULL; | |
SELECT GROUP_CONCAT(table_schema, '.', table_name) INTO @tables | |
FROM information_schema.tables | |
WHERE table_schema = 'database_name'; -- specify DB name here. | |
SET @tables = CONCAT('DROP TABLE ', @tables); | |
PREPARE stmt FROM @tables; | |
EXECUTE stmt; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[INFO] Scanning for projects... | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] BUILD FAILURE | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Total time: 0.460s | |
[INFO] Finished at: Tue Aug 25 16:15:22 BDT 2015 | |
[INFO] Final Memory: 6M/104M | |
[INFO] ------------------------------------------------------------------------ | |
[ERROR] Error resolving version for plugin 'spring:boot' from the repositories [local (/home/samiul/.m2/repository), spring-snapshots (http://repo.spring.io/snapshot), spring-milestones (http://repo.spring.io/milestone), central (http://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository -> [Help 1] | |
[ERROR] |