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 FOREIGN_KEY_CHECKS = 0; | |
SELECT GROUP_CONCAT(table_schema, '.', table_name) INTO @tables | |
FROM information_schema.tables | |
WHERE table_schema = 'DBNAME' and table_type = 'Base Table'; | |
SET @tables = CONCAT('DROP TABLE IF EXISTS ', @tables); | |
PREPARE stmt FROM @tables; | |
EXECUTE stmt; | |
DEALLOCATE PREPARE stmt; | |
SET FOREIGN_KEY_CHECKS = 1; |
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
const setupEvents = require('./installers/setupEvents') | |
if (setupEvents.handleSquirrelEvent()) { | |
// squirrel event handled and app will exit in 1000ms, so don't do anything else | |
return; | |
} | |
const { | |
app, | |
BrowserWindow, | |
ipcMain | |
} = require('electron') |
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
var http = require("http"); | |
var mysql = require("mysql"); | |
var fs = require("fs"); | |
var jsonContent = null; | |
const prompt = require('electron-prompt'); | |
var userdata = { | |
"host": '', | |
"port": '', | |
"username": '', | |
"password": '', |
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
const fs = require('fs-extra') | |
var del = require("delete"); | |
//delete js | |
console.log("Deleting Old JS"); | |
del.sync('../electron/main.*.js', { | |
force: true | |
}); | |
console.log("Deleted"); |
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
<UserControl x:Class="TestApp.mainUserControl" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:local="clr-namespace:SaiData.TestApp" | |
mc:Ignorable="d" | |
> | |
<Grid> | |
<Grid.ColumnDefinitions> |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Data; | |
using System.Windows.Documents; | |
using System.Windows.Input; |
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
DataGrid dg = new DataGrid(); | |
dg.HorizontalAlignment = HorizontalAlignment.Left; | |
dg.VerticalAlignment = VerticalAlignment.Top; | |
dg.AutoGenerateColumns = true; | |
//the function getData used to get the data from data-source, you can manipulate it. | |
getData gd = new getData(); // getData holds getUserRecord() to get the data | |
UserData[] data = gd.getUserRecord(); | |
dg.ItemsSource = data; |
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 | |
$chrome_path = 'C:\"Program Files (x86)"\Google\Chrome\Application\chrome.exe'; // for windows user | |
$chrome_path = 'chromium-browser'; // for linux user, first install chromium-browser to linux | |
$output_file = 'path/to/store/sample.pdf'; | |
$url = 'http://www.google.com'; | |
$command = $chrome_path . " --headless --disable-gpu --enable-logging --print-to-pdf=" | |
. $output_file . " " . $url . " --virtual-time-budget=1000 "; // virtual-time-budget is used for delay loading js | |
try { | |
exec($command); | |
} catch (Exception $ex) { |
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
for (var i = 0; i <= 100; i++) { | |
if (i % 3 == 0 && i % 5 == 0) { | |
console.log('FizzBuzz') | |
} else if (i % 3 == 0) { | |
console.log('Fizz') | |
} else if (i % 5 == 0) { | |
console.log('Buzz') | |
} else { | |
console.log(i) | |
} |
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
var config = { | |
apiKey: "yOurAppAPIkey11", | |
authDomain: "your-app.firebaseapp.com", | |
databaseURL: "https://your-app.firebaseio.com", | |
projectId: "your-app", | |
storageBucket: "your-app.appspot.com", | |
messagingSenderId: "3034404405537" | |
}; | |
firebase.initializeApp(config); |
OlderNewer