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
| function SearchForIP() | |
| { | |
| var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("IP List"); | |
| var resultsheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Related Data"); | |
| var IPs = sheet.getRange(2,1,sheet.getLastRow()-1,1).getValues(); | |
| var IPdata = []; | |
| var message_text =""; | |
| for(var i in IPs) | |
| { | |
| var url = 'http://api.ipstack.com/'+ IPs[i][0]+ '?access_key=access_key&output=json'; |
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
| function getFolderID(folderName) | |
| { | |
| var folders = DriveApp.getFolders(); | |
| while (folders.hasNext()) { | |
| var folder = folders.next(); | |
| if(folder.getName() == folderName) | |
| { | |
| return folder.getId(); | |
| } | |
| } |
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
| function importCSV() | |
| { | |
| var getfile = "singleColumn.csv"; | |
| var getFolder = DriveApp.getFolderById('this is my folder id'); | |
| var fi = getFolder.getFilesByName(getfile); | |
| if (fi.hasNext()) | |
| { | |
| var ssNew = SpreadsheetApp.getActiveSpreadsheet(); | |
| var newSheet = ssNew.getSheetByName("Data from CSV");// select data from CSV tab | |
| var file = fi.next(); |
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
| function testJiraConnection() | |
| { | |
| var baseURL = "https://yourserver/rest/api/2/search"; | |
| var username = "username"; | |
| var password = "pass"; | |
| var encCred = Utilities.base64Encode(username+":"+password); | |
| var fetchArgs = { | |
| contentType: "application/json", | |
| headers: {"Authorization":"Basic "+encCred}, |
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
| function onOpen(e) { | |
| //method 1 | |
| SpreadsheetApp.getUi() | |
| .createMenu('My Menu') | |
| .addItem('My menu item', 'myFunction') | |
| .addSeparator() | |
| .addSubMenu(SpreadsheetApp.getUi().createMenu('My sub-menu') | |
| .addItem('One sub-menu item', 'mySecondFunction') | |
| .addItem('Another sub-menu item', 'myThirdFunction')) | |
| .addToUi(); |
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 partial class MainWindow : Window | |
| { | |
| public MainWindow() | |
| { | |
| InitializeComponent(); | |
| DataContext = new DataContext(); | |
| } | |
| private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) | |
| { |
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
| <StackPanel> | |
| <ComboBox SelectedItem="{Binding Item}" ItemsSource="{Binding itemList}" | |
| Margin="105,56,52,0" Height="27" SelectionChanged="ComboBox_SelectionChanged"> | |
| <ComboBox.ItemTemplate> | |
| <DataTemplate> | |
| <TextBlock Text="{Binding Name}"/> | |
| </DataTemplate> | |
| </ComboBox.ItemTemplate> | |
| </ComboBox> | |
| <ListView Name="VitaminsListView" SelectedItem="{Binding SubItem}" |
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 class Item | |
| { | |
| public int itemID { get; set; } | |
| public string Name { get; set; } | |
| public Item(int ID, string name) | |
| { | |
| this.itemID = ID; | |
| this.Name = name; | |
| } |
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 class ClientIdleHandler : IDisposable | |
| { | |
| public bool IsActive { get; set; } | |
| int _hHookKbd; | |
| int _hHookMouse; | |
| public delegate int HookProc(int nCode, IntPtr wParam, IntPtr lParam); | |
| public event HookProc MouseHookProcedure; | |
| public event HookProc KbdHookProcedure; |
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
| ==== In the mainWindow.xaml.cs ====== | |
| //constructor | |
| public MainWindow() | |
| { | |
| main = this; | |
| } | |
| internal static MainWindow main; | |
| internal string Status | |
| { |
NewerOlder