FAQ Database Discussion Community


Laravel 5: synching an extra field via pivot

php,mysql,laravel,pivot,sync
User model: public function positions() { return $this->belongsToMany('App\Position')->withPivot('company_id')->withTimestamps(); } Positions model: public function users() { return $this->belongsToMany('App\User')->withPivot('company_id')->withTimestamps(); } On form submission I have two arrays: $allPositionIds array:3 [ 0 => 98 1 => 99 2 => 100 ] $allCompanyIds array:3 [ 0 => 129 1 => 130 2 => 131...

Visual studio 2013 github sync error 403

git,github,visual-studio-2013,sync
I'm getting an error 403: An error occurred. Detailed message: Response status code does not indicate success: 403 (Forbidden). when trying to push or sync Unsynced Commits using visual studio team explorer. When using the command line or sourcetree for example, everything is working fine. did anyone had this error...

android studio gradle sync error

android,android-studio,gradle,sync
After trying a preview version that gave me odd errors, i just did a fresh install of Android Studio 1.1.0 on Ubuntu Linux. I also removed the preferences directory to start from scratch. Now even with new projects gradle sync fails with this error and i cannot find the cause...

No Synchronize Model with Database in Mysql Workbench

mysql,synchronization,schema,mysql-workbench,sync
I'd like to synchronize a model in Mysql workbench. However, I can't find the wizard following these steps in the docs. How do I enable this feature? I'm running 6.3.3.0 (latest) on Mac Os X . ...

How can I redirect, in Go, the stdout and stderr of a command to both the console and a log file while outputting in real time?

go,io,sync
The following bit of code does exactly what I want, except it only prints to the console. cmd := exec.Command("php", "randomcommand.php") cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr if err := cmd.Run(); err != nil { log.Fatal(err) } randomcommand.php: // randomcommand.php simply alternates output between stdout and stderr 20 times $stdout...

Data Sync between 2 tables in Oracle Database

c#,oracle11g,sync
i have 2 tables namely table1 (id, name, address, contact_number, gender) and table2 (id, name, contact_number) used Oracle 11g XE. in table1 i have data : (1, john, Jakarta, 123345, male), (2, reina, Bandung, 568955, female). i wanna have data based on table1 to table2 like (1, john, 123345), (2,...

How sync and async request processing differs in Tomcat?

java,tomcat,asynchronous,sync,nio
I cannot figure out what difference is between sync and async calls in Tomcat. Everywhere I use NIO. I have thousand connections managed by few Tomcat threads. When long sync request incomes a thread borrows from Tomcat thread pool and processes the request. This thread waits for long process to...

chrome.storage.sync.get sync with outer level object, but inner object is not sync?

javascript,google-chrome,asynchronous,sync
I am trying to use chrome.storage.sync.get to get back the settings. What I don't understand is that when I call console.log(settings), it returns the correct values. But if I call console.log(settings.speeds), it returns the old values. I think this has something to do with the async nature of chrome.storage.sync.get. Can...

Ensembles with directories in CloudKit

core-data,sync,cloudkit,ensembles
I'm using Ensembles in this project where I have different user-groups stored under separate directories. I've built this more or less copying the example app, Idiomatic's sync-manager. Initialising the CDECloudFileSystem i do this: newSystem = [[CDECloudKitFileSystem alloc] initWithUbiquityContainerIdentifier:[CKContainer defaultContainer].containerIdentifier rootDirectory:directoryString usePublicDatabase:YES]; Where the directoryString is the global ID of the...

GCDAsyncSocket for Synchronous Requests with Swift 1.2

ios,swift,asynchronous,sync,gcdasyncsocket
Background: I'm using GCDAsyncSocket on a project successfully with Swift 1.2 (via a bridging header). The challenge right now is that it needs some sort of queue because the system it's connecting to can only process and return one command at a time. So if it calls methods back to...

Store Core Data Sqlite in NSLibraryDirectory or NSApplicationSupportDirectory?

ios,sqlite,core-data,path,sync
What is the difference between NSLibraryDirectory and NSApplicationSupportDirectory? Which one is the best place to store the Core Data .sqlite file if I am planning on using a syncing service? I currently store my .sqlite file in NSLibraryDirectory. If NSApplicationSupportDirectory turns out to be the better choice, how will changing...

Hybris sync system error

sync,hybris
I am using the Hybris CMS system. I have recently uploaded multiple products through the productcockpit but when I go to sync on HMC I get "SYSTEM ERROR". I'm trying to find the cause for the error, I have checked all the new products I have added but can't see...

Calendar App: How to sync moved items?

ios,ruby-on-rails,core-data,calendar,sync
I am trying to build a calendar app with same set of syncing feature of Google Calendar and Sunrise app How to tackle moved events or deleted events ? For example: For a month API call I received 100 event ids and I stored it locally. Next time I should...

repo: stuck while syncing (also with -f)

android,git,sync,repo
Last day I wanted to do repo sync (I'm compiling android sources), and then I noticed that it got stucked in 99% I did some researchs and people adviced to use repo sync -f, but the problem was the same. Also in the android official page, they said that you...

Sync single table between MSSQL and MySQL

mysql,sql-server,table,sync
i need to synchronize a table between our MSSQL Database to our MySQL Database. The MSSQL Datbase is the master, MySQL the clone. I can not link the tables(thats the solution when you google it), i have to do it with Queries and a Cronjob. I first thought of SELECT...

How to copy newly created CRM contact record to SQL table

sql,plugins,dynamics-crm-2011,sync
I have written a plugin that fires off when new record is created (post). This plugin simple runs a SSIS package that moves newly created record details in to SQL table. I'm having to deploy this plugin as none isolation mode. What I want to know is that is there...

Highcharts series data select point video sync

video,data,highcharts,sync,series
I need some help synchronizing a video timeline with the data select point of the curve's serie. To better explain what I want to do and what I did until now, take a look at my example I need that the selected dot stop blinking. i need a more fluid...

Mobile live synchronization (eg Trello): sockets?

android,ios,sockets,sync,trello
I was wondering how live synchronization mechanisms such as the one used by Trello work. For example when I move a card from the website, the board is immediately refreshed on the iPhone too. As Push Notifications are not reliable, I suppose a sort of open connection/socket stream is used...

Fetch a Model's associations in Laravel to simplify creation/update

php,laravel,orm,sync
I have a Movie model with the following associations (belongsToMany): Actor Country Genre ... When a form is posted, I have this data (skipping a lot of details here): 'actors' => array( 'Cary Grant', 'Grace Kelly', ... ), 'genres' => array( 'Drama', ... ), ... I'd like my update()/store() controller...

Javascript:: Is it possible to create an array of new audio objects?

javascript,audio,asynchronous,mp3,sync
This example work perfectly : var audio=new Audio(); audio.src="Hezi.mp3"; audio.play(); But I was wondering if there is a possibility to create an array of new audio objects like such: var audio[0]=new Audio(); audio[0].src="Hezi.mp3"; audio[0].play(); var audio[1]=new Audio(); audio[1].src="Gangina.mp3"; audio[1].play(); Off-course the second example is not the current syntax but just...

Multiple jQuery slideshows won't stay in sync

javascript,jquery,slideshow,sync,timing
I'm using a simple jQuery script to run a fade-in/out slideshow. (I'm a nubee at jQ.) I am running 3 instances of the slide show to control 3 separate slide areas. The slides are timed with fadeIn, delay and fadeOut. Here are the controlling code lines from each script: slides.eq(slideCount).fadeIn(1000).delay(6000).fadeOut(1000,...

Sync Framework scope filtering not working properly

c#,sync,microsoft-sync-framework
I have created a sync application for POS(point of sales) Application. One server is linked with multiple terminals. server and terminal databases have [pos_terminal] table. it has [POS_TERMINAL_ID] column as identity. This is how I provision the server. try { string strScopeName = ""; strScopeName = "TERMINAL_SCOPE_T01"; SqlConnection serverConn =...

Xamarin.Forms Background Thread

multithreading,xamarin,sync,background-thread
I'm trying to get a really simple application running listing google Task. I have a SQLite local db I'd like to sync / try syncing at regular interval with Google's server. I was thinking of simply running a simple background thread so it'd work easily on all devices. Problem comes...

How to Access QB Synced Data?

data,sync,desktop,quickbooks,manager
How to Access QB Synced Data? Hello I have customer they use QB then they sync using QB Sync Manager, How I can access the synced data? and the synced data we can view it online using QB online? Thanks...

Meteor synchronus content for each client

javascript,html,meteor,three.js,sync
I'm trying to make a multiplayer snake in three.js with meteor, it works well for one player to only control one snake (though we have only 3 specified users who can control one out of 3 snakes for now) now the problem is, that you can't see the other players...

Adding new connection to existing android contact

android,sync,contacts
gyus. I'm trying to add a connection to an existing contact, like viber does: It was pretty simple to add a contact with such connection following nemezis repo, but I haven't managed to update a contact in order to add a connection. I have tried: ops.add(ContentProviderOperation.newUpdate(addCallerIsSyncAdapterParameter(Data.CONTENT_URI, true)) .withSelection(Data.RAW_CONTACT_ID + "=...

Synchronizing folders between two servers

php,sync,rsync,fallback,mirroring
I have to realize a fallback solution (a auth system) for an external application. Therefore I have to keep the auth folder of my primary auth server syncronized with my fallback servers. The folder contains several .php files, .bin files and some others. Unfortunately I have no idea how I...

How often should an Android app and server sync

java,android,playframework,sync,android-volley
I'm developing an Android app that talks to a Play-framework app, the two apps are passing user data between one another using Volley requests, my question is this: Is it desirable to have the Android app sync with the Play server constantly to check for changes to the user profile?...

How to “partial sync” code between two different git repositories?

git,sync
Suppose I have two git repos. At the beginning, the code of these two repos are the same. But then some of the commits to repo 1 will also be needed for repo 2, but some others not. So for this situation, what is the best practice? How to just...

Laravel: extra field sync with array

php,laravel,sync
Im trying to save data inside a pivot table with an extra field called data. when i save i have this array: [ 5 => "files" 4 => "pictures" 3 => "tags" 1 => "thumbs" ] My table looks like this: project_id option_id name The ids shown above refer to...

Check if auto sync is enabled in Android

android,sync
I'm trying to put a button to enable or disable the auto sync, I know there's a way to enable the auto sync to all accounts with ContentResolver.setMasterSyncAutomatically(boolean), but I can't find a way to check if this "Master Sync" is enabled. Is there any way to find it out?

How to get all sync adapters (type/authority) for a specific package

android,package,sync,authority
I'm trying to determine the list of sync adapters an installed apps provides, but I can't find anything linking a sync authority and the package/app handling it? Using AccountManager.getAccountsByType only provides account, no authority or package information at all. Using ContentResolver.getSyncAdapterTypes() provides all sync authorities available, however I'm unable to...

While scaling up, how to make user uploaded files available accross multiple servers?

webserver,sync
I have a website in which users would upload various and later access them. The files are stored in a specific path in the server at this point. Now if I need to have multiple servers for the website, what is the best way to make the user uploaded files...

Best practice to do multiple replicates with pouchdb?

javascript,sync,pouchdb
Since my app requires the complete event, I've moved my code from .sync to .replicate and I was wondering what is the best practice in term of synching over some period of time. At first, I replicate to and from, and I can store last_seq. For future replicate, should I...

is there any way to sync the folder in my mobile storage with the folder in my AWS S3 bucket?

android,amazon-web-services,amazon-s3,sync,amazon-cognito
i have a folder called 'AWS S3 Bucket' in my android mobile storage and another folder in AWS S3 bucket. Now i want these (the folder in my mobile storage and the S3 contents) to be in sync when the mobile is connected to internet. I want exactly the same...

Best practices in syncing data

synchronization,sync,offline-caching,offlineapps
Context A mobile application can add/edit/delete a customer in it's own offline database. A web application can also add/edit/delete a customer in the master database on a web server. The mobile application will try to sync it's database with the master database every X hours, provided it has an internet...

duplicate an android studio project

android,gradle,duplicates,project,sync
Im using Android studio and Im trying to deplicate an existing project to make another new. i search in the web and also at the forum and i found this method : - copy the folder of the old project and rename it - change the package name in the...

Does FileDescriptor.sync() work for all file data or just file data originating within the callers JVM

java,caching,sync,flush,file-descriptor
Will this ensure that all data is synced on the local machine or just data originating within the currently operation JVM? FileOutputStream s = new FileOutputStream(filename) s.getFD().sync() FileInputStream fis = new FileInputStream(null); fis.getFD().sync(); Context: we have many programs (other software) that write to a file that we share. We all...

How to set up two MySQL databases on separate servers to sync with string replace?

mysql,string,replace,sync
I have two MySQL databases on two separate servers. Both will host the same CMS but one will serve general visitor traffic while the other - the master - is accessed by editors. The contents of the the two database have to be identical, but as the two servers have...

Syncing Vagrant VMs across different physical servers

linux,vagrant,backup,virtual-machine,sync
I'm using Vagrant to deploy my VMs and my current setup looks like this: server1 = VM1, VM2, VM3 ( main production server ) server2 = VM1, VM2, VM3 ( backup server ) My questions is, can I somehow sync the VMs across the different physical servers in case one...