on-internet

MS Excel: How do I make cell references variable?

I probably didn't word that title correctly, so let me explain what I'm trying to do. I need to find cycles in a series of data. So let’s say I have all of my data in column A of an Excel spreadsheet. If a condition that I’m looking for is true in, say, cell A7, I want to check to check if it’s true in every second cell (A9, A11, A13 and so forth). If it’s not true in every second cell, I want to adjust the model to check every third cell starting with that A7 cell (A10, A13, A16, and so on). If the condition is not true in every third cell, then I want to check every fourth cell (A11, A15, A1

Join the discussion →

How do I control the size of html window?

I would like to control the size (width and height) of an html window page. I would like the page to be small like a popup window. I would like the properties in the same html document to control the size of the browser without having to make a javascript link in another page.. Below is what I did to control the size of the document, but it didn't work... Help! <!DOCTYPE html> <html> <head> <link type="text/css" /> <style type="text/css"> html {height: 500px; width:500px; margin:0; padding:0; } body {height: 500px; width:500px; margin:0; overflow: hidden; padding:0; } .container {height: 500px

Join the discussion →

Asterisk PIAF dimensioning hardware

I am looking for Suggested Hardware to install FIAF(asterisk) AWS EC2 instance. Enterprise grade Hardware to serve medium and large Enterprise IT industry. OS: Centos Codec: G.711 alaw/ulaw Maximum concurrent call: 500 Total SIP Peers: 1000 Only extension to extension calling. Not using to call via trunk like SIP or E1/T1. I am seeking for the reply from the expert comunity!!

Join the discussion →

How to force rsyslog ommysql use utf8?

I'm using ommysql in rsyslog for transfering data into mysql $ModLoad ommysql local6.* :ommysql:localhost,Syslog,rsyslog,1 but cyrilic data goes like "·Ð¾Ð²Ð°Ð½Ð¸Ðµ иÑ�точнÐ" in database. I think It's because ommysql doesn't set utf8 encoding and starts inserting at once it's connected: http://s017.radikal.ru/i441/1606/e0/050cf30c495f.png Is it any way to say «set names utf8;» before inserting?

Join the discussion →

Prevent translation files from being cleaned by Makefile

I am using Qt Creator 4.0.0 along with CMake > 3.4. I am generating translation files thanks to this command: QT5_CREATE_TRANSLATION(${PROJECT_NAME}_TRANSLATIONS_COMPILED ${${PROJECT_NAME}_TRANSLATIONS_SOURCES} ${${PROJECT_NAME}_TRANSLATIONS_FILES}) Each time I build my project, the translation files are either created or updated if they already exist. However, when I clean the project, the ts files are removed. Is there an easy way from CMake or Qt Creator to prevent them from being cleaned?

Join the discussion →

Batch File output based on hostname

Struggling to find the answer/code needed. Currently using the following script. I'd like the text output file to be the Host name. How can i do this? @echo off REM setlocal enabledelayedexpansion ( systeminfo | findstr /c:"Host Name" systeminfo | findstr /c:"Domain" systeminfo | findstr /c:"OS Name" systeminfo | findstr /c:"OS Version" systeminfo | findstr /c:"System Manufacturer" systeminfo | findstr /c:"System Model" systeminfo | findstr /c:"System type" systeminfo | findstr /c:"Total Physical Memory" ipconfig | findstr IPv4 echo. echo Hard Drive Space: wmic diskdrive get size echo. echo. e

Join the discussion →

Set Default Drop Down Value in Bootstrap

I am new to JS and would like to set a default value when the page loads. My HTML: <!DOCTYPE html> <html> <head> <script src="js/jquery.min.js"></script> <script src="shared/shiny.js" type="text/javascript"></script> <script src="css/bootstrap-3.3.6-dist/js/bootstrap.min.js"></script> <link rel="stylesheet" href="css/bootstrap-3.3.6-dist/css/bootstrap.min.css"> <script src="js/app.js" type="text/javascript"></script> </head> <body> <div class="dropdown" id="country_select"> <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">Country<span class="caret"></span></

Join the discussion →

create new column of values against an existing string in a csv file in python [duplicate]

I have a program to store a persons name and their score, in a csv file in python. for example this is my current code : student_name = input("Name: ") score = input("Score: ") class_name = "student_scores.csv" file = open(class_name , 'a') file.write(str(student_name) + ", " + str(score) + "\n") file.close() The output csv file is, (name = bob) and (score = 1) : bob, 1 When i enter another score (2) for the same person (bob) the csv file looks like this: bob, 1 bob, 2 However how can i change my code, so that the csv file looks like this (with more than 2 columns) : bob, 1, 2

Join the discussion →

Trying to Load Data from Excel into SQL Server. 32-bit Excel and 64-bit SQL Server Throws Error

I've tried a few different ways to load data from Excel into SQL Server, as shown here: Use [TestDatabase] SELECT * INTO dbo.tbl_SST_Personnel FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0 Xml;HDR=YES;Database=C:\Users\rshuell001\Desktop\DATA - INPUT FILES\STT_Personnel.xlsx', 'SELECT * FROM [tbl_SST_Personnel]') GO insert into OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=C:\Users\rshuell001\Desktop\DATA - INPUT FILES\STT_Personnel.xlsx;', 'SELECT * FROM [tbl_SST_Personnel]') select * from tbl_SST_Personnel Insert into tbl_SST_Personnel Select * FROM OPENROWSET('Micros

Join the discussion →

Paramiko, Python, Windows : How to connect to a remote computer and from there to a NAS using SSH

I've seen several questions and answers related to this topic but I've been unable to grasp the howto. What I'm able to do : connect to a remote computer using a Python script using Paramiko and return information, for instance, to ping a switch : ssh = pk.SSHClient() ssh.set_missing_host_key_policy(pk.AutoAddPolicy()) ssh.connect('{}'.format(IP), port=xxx, username='xxx',password='xxx') stdin, stdout, stderr = \ ssh.exec_command('ping -n 1 xxx.xxx.x.x\n') print('Ping switch: \n', stdout.readlines()) What I would like to do but don't know how to : connect once to the computer and then using SS

Join the discussion →

getting the cursor of the user input to be on the same line as the printed statement

I have a program which I would like the user to input the answer on the same line as the question which is printed. the code looks like this: question = 1 number1 = 2 number2 = 2 print(question , ") " , "What is" , number1 , "+" , number2 , "? ") user_ans = int(input("")) #The Answer the user inputs to the question asked print (user_ans) But the Output is: 1) What is (number1) + (number2) ? (the cursor goes here) However how do I get the output to be this: 1) What is (number1) + (number2) ? (the cursor goes here)

Join the discussion →

Error in R: no applicable method for 'predict' applied to an object of class "regsubsets"

I was trying to run codes from textbook ISLR. It is about Best Subset Selection: library(ISLR) #contain data Hitters library(leaps) #use regsubsets regfit.full=regsubsets(Salary~.,Hitters) predict(regfit.full) Then R showed error: Error in UseMethod("predict") :no applicable method for 'predict' applied to an object of class "regsubsets" I am using Windows RStudio Version 0.99.893, R-3.2.4revised-win. I really have no idea why the "predict" cannot apply to "regsubsets". other info: > sessionInfo() R version 3.2.4 Revised (2016-03-16 r70336) Platform: x86_64-w64-mingw32/x64 (64-bit) Running und

Join the discussion →

Confirmation when installing with pip globally

Sometimes when working with Python projects one can forget to activate a virtual environment. Is there a way to get an explicit confirmation when installing Python modules with pip to the global scope instead of a virtual environment?

Join the discussion →

Draw a triangle in assembly with fasm

I'm trying to draw a triangle in assembly using fasm but I just can't make it. I have the following code to draw a rectangle and I thought that I should just decrease the [comp] value inside the cycle "ciclopinta" but that just doesn't work (or I'm doing it wrong). org 100h mov ah,4fh mov al,02h mov bx,13h int 10h mov [alt],50 mov [comp], 100 mov dx, 100 mov cx,100 ciclopinta: ciclo1: mov ah,0ch mov al,23h mov bh, 0 int 10h dec cx dec byte[comp] jnz ciclo1 mov cx, 100 mov [comp],100 dec dx dec byte [alt] jnz ciclopinta mov ah, 07h int 21h mov ah,4ch int 21h comp rb 1 alt rb 1

Join the discussion →

GuzzleHttp give me 500 error

I try to use GuzzleHttp with Magento to update my product catalog. I use a pool request to get data from database and I try to post them into magento trought API $apiUrl = 'http://xxx.xxxxx.xxx'; $middleware = new Oauth1([ 'consumer_key' => '-------------------------------', 'consumer_secret' => '-------------------------------', 'token' => '-------------------------------', 'token_secret' => '-------------------------------' ]); $stack->push($middleware); $client = new Client(); $clientUpdate = new Client([ 'base_uri' => $apiUrl, 'handler' => $stack, 'auth' => 'oauth' ]); $mapper = new JsonMa

Join the discussion →

How to solve an error "oTable.draw is not a function" in filtering datatables?

I have a search form above the datatables. When I try to search, I have got the data shows in JSON format, not filtering the datatables. The error is Uncaught TypeError: oTable.draw is not a function Here is the javascript: $(document).ready(function(){ var oTable = $('#surat').DataTable({ processing: true, serverSide: true, ajax: { url: '{!! route("surat") !!}', data: function (d) { d.jenis_surat = $('input[name=jenis_surat]').val(); d.nomor_surat = $('input[name=nomor_surat]').val(); d.perihal = $('input[name=perihal]').val(); } }, columns: [ {data: 'no', name: 'no'}, {data: 'jenis_surat', n

Join the discussion →

scanf_s not enough arguments passed for format string(Visual Studio)

The program showing error as title. What's wrong on the scanf_s function? Any idea? int main() { struct Students { char name[10]; int snum; float point; } st[5]; int i; for (i = 0; i < 5; i++) { printf("-- Student Info --\n-"); printf("Enter Your Name: "); scanf_s("%s", st[i].name); printf("\nEnter Your Number: "); scanf_s("%d", &st[i].snum); } return 0; }

Join the discussion →

TypeError: socket.emit is not a function

I'm trying to write basic online game, just to check my current level in web programming. Here is some code I have right now: var io = require('socket.io') (serv, {}); io.sockets.on('connection', function(socket) { console.log('1 '+socket); function fight (player,monster) { console.log('2 '+socket); monsterData = {}; monsterData.name = monster; switch(monster){ case 'rat 1st level': monsterData.hp = 50; monsterData.attack = 1; monsterData.money = Math.floor(Math.random()*3)+1; break; } result = attack(player,monsterData); console.log('3 '+socket); if(result.winner === 'player'){ db.account.fin

Join the discussion →

Import csv Python with Spyder

I am trying to import a csv file into Python but it doesn't seem to work unless I use the Import Data icon. I've never used Python before so apologies is I am doing something obviously wrong. I use R and I am trying to replicate the same tasks I do in R in Python. Here is some sample code: import pandas as pd import os as os Main_Path = "C:/Users/fan0ia/Documents/Python_Files" Area = "Pricing" Project = "Elasticity" Path = os.path.join(R_Files, Business_Area, Project) os.chdir(Path) #Read in the data Seasons = pd.read_csv("seasons.csv") Dep_Sec_Key = pd.read_csv("DepSecKey.csv") These files im

Join the discussion →

Invalid Command 'RewriteEngine' but mod_rewrite is enabled

I am setting up a gitlab site with this conf file But this error arise: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration I have install apache 2.4.20 from source. And forgot that I have installed 2.4.7 with apt-get. Right now apache -v shows 2.4.7 though. I have followed a lot of solutions but they do not work: Inside the httpd.conf file uncomment the line LoadModule rewrite_module modules/mod_rewrite.so (remove the pound '#' sign from in front of the line) Apache2 ProxyPass for Rails App Gitlab I have check the rewrite modules

Join the discussion →

Getting every possible substring

I would like to generate every possible consecutive substring of a string, including the end of the word/beginning from the word (cyclic) letter combinations. I've found an example in Python, but the only language I know is Perl (and barely, I'm a beginner). I would appreciate it a lot if someone can help me translating the code to Perl or to help me find a solution in Perl. The Python code is the following: aa='ABCD' F=[] B=[] for j in range(1,len(aa)+1,1): for i in range(0,len(aa),1): A=str.split(((aa*j)[i:i+j])) B=B+A C=(B[0:len(aa)*len(aa)-len(aa)+1]) It gives you: C=['A', 'B', 'C', 'D', '

Join the discussion →

How can I remove tralling backslash from $(ProjectDir)?

I have a command line like this in my post-build event: aspnet_regiis -pef connectionStrings "$(ProjectDir)" -prov "DataProtectionConfigurationProvider" But aspnet_regiis is returning a failure because the tralling \ in the directory. Pass full name, path + web.config doesn't work either. How can I solve this?

Join the discussion →

How to Serialize Avro to a byte array using Avro c# library?

I am looking for a way to serialize Avro to a byte array in Avro C# library. There is a link to do for Avro Java library as described in following link from Avro documentation: https://cwiki.apache.org/confluence/display/AVRO/FAQ#FAQ-Serializingtoabytearray Code copied from above link: ByteArrayOutputStream out = new ByteArrayOutputStream(); BinaryEncoder encoder = EncoderFactory.get().binaryEncoder(out, null); DatumWriter<User> writer = new SpecificDatumWriter<User>(User.getClassSchema()); writer.write(user, encoder); encoder.flush(); out.close(); byte[] serializedBytes = out.toByteArray(); B

Join the discussion →

How to send worksheet in email body?

Is there any way I can attach as well as send a worksheet as an email body. The below VBA code sends the worksheet as an attachment. How can I send a worksheet in the body of email? Sub Email() Dim OutApp As Object Dim OutMail As Object Dim wbTemp As Workbook Dim strFilename As String Dim Sendrng As Range ThisWorkbook.Worksheets("Test Worksheet").Copy Set wbTemp = ActiveWorkbook wbTemp.SaveAs ThisWorkbook.Path & "/" & "TestWb", XlFileFormat.xlOpenXMLWorkbook strFilename = wbTemp.FullName Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) On Error Resume Next Wi

Join the discussion →
Older stories