2018-10-22         Samantha

Makefile generic pattern rule -- xyzzy-en_US.ext2 from xyzzy.ext0

I can't figure out a way to define a generic pattern rule for the following kind of production with make:require xyzzy-en_US.ext2 from xyzzy.ext0 via xyzzy.ext1.This works:all: xyzzy-en_US.ext2# to be compiled from xyzzy.ext0%.ext1 : %.ext0 # produce xyzzy.ext1%-en_US.ext2 : %.ext1 # produce xyzzy-en_US.ext2But how to generalize the locale part of the second rule? Or do I need to generate rules for all different locales?Neither of these work:%-??_??.ext2 : %.ext1 # ...%.ext2 : $(@,%-??_??.ext2,%.ext1) # ... There is no good way to do this with Make (regex handling is...

 makefile                     1 answers                     79 view
 2018-10-22         Samantha

QuickBooks Desktop Web Connector Autorun a Request Queue

I'm using quickbooks desktop. I want to dump the CustomerQueryRq response every 5 minutes. I started on top of ConsoliBYTE docs/web_connector/example_app_web_connectorWhat I want to do:I'm looking for a way where I don't have to visit the handler.php file every 5 minutes to trigger the queue. I believe there's a better way.Here's what I did:Created and registered a .qwc file in web connectorModified the config, qbwc, handler and functions filesCreated cron job that calls the handler.php file every 5 minutes.It gives me a json file like this: json file which is exactly what ...

 php                     1 answers                     51 view
 2018-10-22         Samantha

Import media python 3

I installed the media module for python 3; however, my code simply won't print. I am trying to simply this certain instances for the class I defined. from pygraphics import mediaclass Movie(): def __init__(self, movie_title, movie_story, movie_img, movie_trailer): self.title=movie_title self.story_line=movie_story self.imgurl=movie_img self.trailer_youtube=movie_trailertoy_story=media.Movie("Toy Story", "A story of a boy and his toys that come to life", "url", "url1")print(toy_story.movie_story) You are not trying to import a module you are trying to imp...

 python-3.x                     1 answers                     12 view
 2018-10-22         Samantha

if x in [list] iterator

def new_user() -> str: users = [] print("Welcome to The 'Create New User' Interface") sleep(0.5) x = input("Enter Name to Use for Account Access\n*Name is Case Sensitive to Access Account*: ") if x in users: x = input("That User Already Exists! Enter a New Name: ") users.append(x) print("Your Account Access Name is: " + str(x)) else: users.append(x) print("Your Account Access Name is: " + str(x))So I'm not sure how to word this question but I have this block of code and as you can see I want to check if the user inputt...

 python                     2 answers                     86 view
 2018-10-22         Samantha

Checking if time, from string, is greater then current time

I have some string likeex. '8:00 AM' '12:00 PM' '2:00 PM'how can I check in javascript or jquery to see if this time is past the current time?Here is what I've tried so far but the isAfter method doesn't seem to work var time = moment(startTime, 'HH:mm A'); //.format('HH:mm A');if (time.isAfter(moment())) { yb.base.eventAlert("You can't create events in the past! Try refreshing your page", "info"); return false;}Try this function :function checktime() { var dt = new Date(); //Get current time var time = dt.getHours() + ":" + dt.getMinutes(); //Get hour and minutes var...

 javascript                     3 answers                     73 view
 2018-10-22         Samantha

Angular 6's ng serve cannot find @angular/router.ngfactory without re-running ng serve

When I modify anything in my app, up until recently the ng serve auto-refreshing of the code to the browser was working (for the most part) perfectly. Now, however, it is not working at all, with any change triggering a re-compile, which always outputs the following error:ERROR in ./src/app/msys-modules/main/msys-submodules/manage-views/manage-views.module.ngfactory.jsModule not found: Error: Can't resolve '@angular/router.ngfactory'However, if I Control-C out of ng serve and re-run it, it runs perfectly well and ends with Compiled succesfully.I've tried to run npm install ...

 angular                     1 answers                     95 view
 2018-10-22         Samantha

Trouble reading an integer with fscanf

I've been struggling for more than a day trying to figure out what's wrong with this piece of code,printf is always printing 0 on my screen.#include <stdio.h>#include <ctype.h>int main(){int one=0,two=0;FILE *arq;arq = fopen ("testando.txt","w+");fprintf(arq,"1,2,3\n");fscanf(arq,"%d%d",&one,&two);printf("%d %d\n",one,two);return 0;} Add commas in fscanf(arq,"%d%d",&one,&two);Reopen file with r flag - to read itDon't forget to close files ;)Opt. you can use return value of fscanf to check how much properties are filledThis works fine:#include ...

 c                     1 answers                     29 view
 2018-10-22         Samantha

MySql Partitioning

I'm trying to create partitions in one big table, but I'm getting this error:1505 - Partition management on a not partitioned table is not possibleThere is any command to convert the table? Or do I have to create a new one and import all data?There is any problem when using Partitioning with Replication?Thanks in advance,Pedro Try:ALTER TABLE table_name PARTITION BY ... [XXX]

 mysql                     1 answers                     51 view
 2018-10-22         Samantha

Order by Month and Year in a merge query

Here is my query SELECT DateName ,SubTotal ,Discount ,TotalAmount ,Investment ,(CASE WHEN Expense.expense IS NULL THEN 0 ELSE Expense.expense END) + (CASE WHEN MonthlyExpense.Expense IS NULL THEN 0 ELSE Monthlyexpense.Expense END) Expense ,Profit - ((CASE WHEN Expense.expense IS NULL THEN 0 ELSE Expense.expense END) + (CASE WHEN MonthlyExpense.Expense IS NULL THEN 0 ELSE Monthlyexpense.Expense END)) AS NetProfit ,TotalAmount - ((CASE WHEN Expense.expense IS NULL THEN 0 ELSE Expense.expense END) + (CASE WHEN MonthlyExpense.Expense IS NULL THEN 0 ELSE ...

 sql                     3 answers                     51 view
 2018-10-22         Samantha

Problem with handling COM events in VB.NET

I'm calling the SQLDMO 8.0 COM library from VB.NET (using a PIA I generated with tlbimp) in order to backup a database with percentage completion notification:Dim server As SQLDMO.SQLServer = NothingDim backup As SQLDMO.Backup = NothingDim restore As SQLDMO.Restore = NothingDim backupAbortable As BooleanDim restoreAbortable As BooleanTry server = New SQLDMO.SQLServer server.LoginSecure = True server.Connect(serverName) backup = New SQLDMO.Backup backup.Action = SQLDMO.SQLDMO_BACKUP_TYPE.SQLDMOBackup_Database backup.BackupSetDescription = "test" backup.B...

 .net                     1 answers                     28 view
 2018-10-22         Samantha

How to conver mqtt's payload data to kafka string type

Now I'm trying to connect from mqtt messages to kafka (actually spark streaming in kafka)I used this connecter https://github.com/evokly/kafka-connect-mqttAnd Spark-2.1.0, Kafka - streaming output such like this({"schema":{"type":"string","optional":false},"payload":"mqtt"},{"schema":{"type":"bytes","optional":false},"payload":"MTIzMTIz"})and producer code object mqttProducer {def main(args: Array[String]) {val brokerUrl = "tcp://ip"val topic = "mqtt"val msg = "123123"var client: MqttClient = null// Creating new persistence for mqtt clientval persistence = new...

 apache-kafka                     1 answers                     9 view
 2018-10-22         Samantha

Heroku : Mcrypt PHP extension required (php7 on Ubuntu16)

I tried to push my code on the heroku app. Usually it always worked, but today it returned me the following error :php artisan clear-compiledremote: Mcrypt PHP extension required.remote: Script php artisan clear-compiled handling the post-install-cmd event returned with an errorremote: [RuntimeException]remote: Error Output:remote: install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-r...

 php                     1 answers                     100 view
 2018-10-22         Samantha

Error Connecting to Database: Access denied for user 'cats'@'localhost' (using password: YES)

I have created a database with the following users: 'auc'@'%', 'auc'@'localhost', and 'root'@', 'root'@'::1' and 'root'@'localhost'.But when I try to connect to the WAMP project, it denies me access to the database with the message: Error Connecting to Database Access denied for user 'cats'@'localhost' (using password: YES)But I do not have in my users list the user 'cats', can anyone help me with these problems:* the user issue (a user that I cannot find in my users list)** how to allow access to the projectThanks As per OpenCats (opens source project) https:...

 php                     2 answers                     95 view
 2018-10-22         Samantha

Issue connecting to SQL Express

I have two visual studio 2010 projects that I am running locally. One is a cloud project and connects to azure table (development) storage in addition to a local SQL Express, the other is not a cloud project. Both projects attempt to connect to a local SQL Express database via similar code generated through an xsd as well as directly in an aspx via a databound grid. The non-cloud project connects fine, but the cloud project fails with the common error:"An attempt to attach an auto-named database for file C:\Users...mdf failed. A database with the same name exists, or specif...

 azure                     2 answers                     34 view
 2018-10-22         Samantha

How to verify the integrity of the files that result from a mongodump operation?

From the research I have done, mongodump doesn't have a built-in check to verify the integrity of a mongodump operation; at least, nothing apparent to the user. I may be wrong. If I am, please inform me. Otherwise, I'm sure I'm not the only one who wishes to verify their mongodump operation copied the data without any corruption or loss. What are the various methods others have used to insure the integrity of their mongodump files? If the method for doing so is inherently different on a sharded cluster, please answer how to do so on a single MongoDB instance and one that is...

 mongodb                     1 answers                     16 view
 2018-10-22         Samantha

React : new date() shows date of client machine rather than server

This question already has an answer here: What time zone does the Javascript new Date() use? 4 answers That is how javascript date works. Please refer to MDN docs for Date for more details. Also checkout the the parameters you can send to customize it. If no arguments are provided, the constructor creates a JavaScript Date object for the current date and time according to system settings for timezone offset Where Date is called as a constructor with more than one argument, the speci...

 javascript                     1 answers                     24 view

Page 1 of 145  |  Show More Pages:  Top Prev Next Last