This file contains hidden or 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
def set_action(self, profile_id, game_id, game_profile, profile_version, type_id): | |
obj = ProfileGame() | |
count_obj = self.get_count_filter(game_id, game_profile) | |
if count_obj == 0: | |
obj = self.fill_object_common(obj, profile_id) | |
obj = self.fill_object_custom(obj, profile_id, game_id, game_profile, profile_version, type_id) | |
self.set_object_filter(obj) | |
else : | |
obj = self.get_object_filter(profile_id, game_id) |
This file contains hidden or 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.Collections.Generic; | |
namespace GoogleAnalyticsTracker | |
{ | |
public partial class Tracker | |
{ | |
public void TrackPageView(string pageTitle, string pageUrl) | |
{ | |
Dictionary<string, string> parameters = new Dictionary<string, string>(); | |
parameters.Add("AnalyticsVersion", AnalyticsVersion); |
This file contains hidden or 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
DELIMITER $$ | |
DROP PROCEDURE IF EXISTS drop_index_if_exists $$ | |
CREATE PROCEDURE drop_index_if_exists(in theTable varchar(128), in theIndexName varchar(128) ) | |
BEGIN | |
IF((SELECT COUNT(*) AS index_exists FROM information_schema.statistics WHERE TABLE_SCHEMA = DATABASE() and table_name = | |
theTable AND index_name = theIndexName) > 0) THEN | |
SET @s = CONCAT('DROP INDEX `' , theIndexName , '` ON `' , theTable, '`'); | |
PREPARE stmt FROM @s; | |
EXECUTE stmt; |
This file contains hidden or 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
select table_name from user_tab_columns | |
where table_name = myTable and column_name = myColumn; |
This file contains hidden or 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 static string GetActualFilePath( string filename ) { | |
// Prefer our persistent data path | |
Debug.Log("Checking for " + Application.persistentDataPath + "/" + filename + ".unity3d"); | |
if (File.Exists(Application.persistentDataPath + "/" + filename + ".unity3d")) { |
This file contains hidden or 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
mysqldump --add-drop-table -h localhost -u username -p dbname > dbname.sql |
This file contains hidden or 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
import os, time, sys, zipfile, datetime,calendar | |
from os import sep | |
import shutil | |
# Script Parameters | |
# Target Directory for final Zip files | |
target_dir = r'target' | |
copy_dir = r'copy' | |
# The name of the sql file (this will be the same for all backups) | |
file_name = 'databases.sql' |
This file contains hidden or 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 UnityEngine; | |
using UnityEditor; | |
using System; | |
using System.Reflection; | |
public class WebWindow : EditorWindow { | |
static Rect windowRect = new Rect(100,100,800,600); | |
static BindingFlags fullBinding = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static; | |
static StringComparison ignoreCase = StringComparison.CurrentCultureIgnoreCase; |
This file contains hidden or 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
<VirtualHost *:80> | |
DocumentRoot D:/http/mysite-com | |
WSGIScriptAlias / D:/http/mysite-com/apache/django.wsgi | |
ServerName mysite.com | |
</VirtualHost> |
This file contains hidden or 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
<html> | |
<head> | |
<meta name="viewport" content="width=device-width" /> | |
</head> | |
<body> | |
<h2><a id="applink1" href="fb://profile/116201417">open facebook with fallback to appstore</a></h2> | |
<h2><a id="applink2" href="unknown://nowhere">open unknown with fallback to appstore</a></h2> | |
<p><i>Only works on iPhone!</i></p> | |