Skip to content

Instantly share code, notes, and snippets.

@exclusiveTanim
exclusiveTanim / code.py
Created November 11, 2020 17:09
Unexpected Out comes here :) :)
import numpy as np
from past.builtins import xrange
MyArray = np.array([[1,1,1,0,1],[0,1,1,0,0],[0,1,1,0,0],[0,0,0,1,0],[0,0,0,1,1]])
Myresult = 0
DataArrayIS = [[[0] * 4 for _ in xrange(len(MyArray[0]))] for _ in xrange(4)]
for i in xrange(len(MyArray)):
for j in xrange(len(A[0])):
DataArrayIS[i % 2][j][:] = [0] * 4
if MyArray[i][j] == 1:
Database name : wordpress103
Database username: tanim103
Database password: 4CovYGvUuoG0Hqqr
Database host: localhost
Table prefix:
User Information
userName: admin
User Password: tanim12345
@exclusiveTanim
exclusiveTanim / database.php
Last active July 15, 2020 09:23
CRUD Operation PHP, MYSql
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "Batch_103";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
@exclusiveTanim
exclusiveTanim / function
Created March 25, 2020 13:54
Just use this function for getting JSON
func userResponse(){
// Prepare URL
let url = URL(string: "http://ba.pakizatvl.com:8070/CRAPI.asmx/GetUserLogin")
guard let requestUrl = url else { fatalError() }
// Prepare URL Request Object
var request = URLRequest(url: requestUrl)
request.httpMethod = "POST"
// HTTP Request Parameters which will be sent in HTTP Request Body
let postString = "UId=rupun&UPas=Rupun";
@exclusiveTanim
exclusiveTanim / app.js
Created December 29, 2019 13:38
Example where data saving will get failed
var win = Ti.UI.createWindow({
backgroundColor: '#fff'
});
var btn = Ti.UI.createButton({
title: 'Save File'
});
btn.addEventListener('click', function() {
var key = 'path';
@exclusiveTanim
exclusiveTanim / app.js
Created December 17, 2019 15:23
Thumbnail
var win = Ti.UI.createWindow({
backgroundColor: '#fff'
});
var btn = Ti.UI.createButton({
title: 'Select Video + Generate Thumbnail'
});
btn.addEventListener('click', selectVideo);
var fdir = "",
inspectionDir = "";
if (Ti.Filesystem.isExternalStoragePresent()) {
Alloy.Globals.fdir = Ti.Filesystem.externalStorageDirectory;
Alloy.Globals.inspectionDir = Ti.Filesystem.externalStorageDirectory;
} else {
if (OS_ANDROID) {
Alloy.Globals.fdir = Ti.Filesystem.applicationDataDirectory;
Alloy.Globals.inspectionDir = Ti.Filesystem.applicationDataDirectory;
} else {
PhaseScriptExecution Run\ Script /Users/user/Library/Developer/Xcode/DerivedData/LibIntuneMSAL-edvsuouvluqkbvcpaxuifybwaesf/Build/Intermediates.noindex/LibIntuneMSAL.build/Debug-iphonesimulator/ComAgilentLibintunemsal.build/Script-CEFE7CFB2385972F003E7BAD.sh (in target 'ComAgilentLibintunemsal' from project 'LibIntuneMSAL')
cd /Users/user/Documents/Appcelerator_Studio_Workspace/LibIntuneMSAL/ios
export ACTION=build
export AD_HOC_CODE_SIGNING_ALLOWED=YES
export ALTERNATE_GROUP=staff
export ALTERNATE_MODE=u+w,go-w,a+rX
export ALTERNATE_OWNER=user
export ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO
export ALWAYS_SEARCH_USER_PATHS=NO
export ALWAYS_USE_SEPARATE_HEADERMAPS=NO
@exclusiveTanim
exclusiveTanim / app.js
Last active November 20, 2019 16:37
createActivityIndicator
Ti.UI.backgroundColor = 'white';
var win1 = Ti.UI.createWindow({
backgroundColor : 'white'
});
var win2 = Ti.UI.createWindow({
backgroundColor : 'yellow'
});
@exclusiveTanim
exclusiveTanim / code.txt
Created October 23, 2019 04:31
Test Code
// Customer have this code in his app
if (OS_IOS) {
Ti.App.addEventListener("resumed", function() {
console.log("I AM FIRED ON RESUME");
processArgs();
});
}
// this is the processArgs method