I'm using a nvidia GTX1080 gpu(8GB) to run Inception model on tensorflow, when I set batch_size = 16 and image_size = 400, then after I start the program, my ubuntu14.04 will auto reboot. 1 AnswersAnswers 1 Make sure it is not a power supply unit problem. I was observing strange occasional reboots on my development machine. As I was increasing the size of input (batch size, larger NN) the rate of reboots was increasing as well. Turned out to be a PSU problem. A quick check is to limit GPU power consumption and see...
Friday, March 31, 2017
move all .cpp & .h in a filter to another project AND correct their folder location
Here is filter of my project in Visual Studio shown in Solution Explorer :- ProjectName1 == References, External Dependencies, Header Files, Resource Files == Source Files ==== myFilter01 ------ K.h (system folder = `D:\ProjectName1\K.h`) ------ K.cpp (system folder = `D:\ProjectName1\K.cpp`) ==== myFilter02 ====== subFilter2_1 --------- B.h (system folder = `D:\ProjectName1\B.h`) ---------...
SVN - how to transform individually checked-out sub-folders into sparse checkout
SVN repo looks like this: top/ top/one top/two top/three ...etc You don't want to checkout the entire top folder but you don't know about SVN's sparse checkout feature. So you check-out repo folder top/one into C:\svn\top\one and then you checkout repo folder top/two into C:\svn\top\two At this point, both of the checked-out folders have their own .svn folder Then you discover sparse checkouts. QUESTION How do you transform the "standalone" checkout of these two folders into a sparse checkout of the top-level folder...
Visual Studio 2015 Professioanl is raising the following error :- Could not load file or assembly 'Microsoft.Activities.Design.Services

I have the following inside my Dev machine:- Windows server r2 2012. SharePoint server 2016. I download/Install Visual studio 2015 Professioanl. I download Microsoft Office Developer Tools Preview 2 for Visual Studio 2015 i created a new empty sharepoint 2016 project inside VS 2015 community. inside the project i added a new Event Receiver. i build the project successfully. but when i click on start debugging the got this weird...
Facebook OAuth Xamarin Forms Redirection

I am using xamarin forms OAuth2 to signin into Facebook, Google and Twitter. On android it works. But on iOS it screen freezes with spinning activity indicator at top right corner. Is there any one having same issue ?. Update: Please find below code partial void UIButton15_TouchUpInside(UIButton sender) { // https://developers.facebook.com/apps/ var auth = new OAuth2Authenticator( clientId: "ID", scope: "", ...
Audio Upload to folder using PHP Jquery
Hiii Everyone,, Below is my HTML. <!DOCTYPE html> <html> <head> <script src="src/recorder.js"></script> <script src="src/Fr.voice.js"></script> <script src="js/jquery.js"></script> <script src="js/app.js"></script> </head> <body> <div class="center_div"> <span class="recording_label">Please wait...</span> <span class="loader_bg"></span> <span...
Is there a way to hide the upper and lower values in a NumberPicker
I want to use this NumberPicker (as the default one is not much customizable), but I want to hide the upper and lower level, showing only the center row...is this possible? I also tried to remove the fadingEdges but, as I read, it's a deprecated attribute; even overScrollMode doesn't work 1 AnswersAnswers 1 I want to hide the upper and lower level, showing only the center row...is this possible? Looking at the source code, there are several things you could try. The easiest would be to change the following constant...
Proxy TCP stream (MySQL and Redis) with Nginx
I read about Nginx Fabric Model and it brings my attention to reconfigure how an application communicates to MySQL and Redis. If local Nginx instance can proxy HTTP traffic efficiently and fast, now it can also proxy TCP without worrying of network, even using database slave as master in case of emergency and potentially encapsulate database sharding. All the benefits can simplify application configuration and its logic, network (congestion, latency, timeouts, retries) won't be a focus in features development anymore. ...
Thursday, March 30, 2017
Not able to add new modules to AngularJs Boilerplate
I am working on an angular project and have decided to use a boilerplate for it. Here is the link to the boilerplate: https://github.com/jakemmarsh/angularjs-gulp-browserify-boilerplate The problem i am facing is that i am unable to add any new moudle. e.g i wanted to add ngCart via npm. I have installed it but it is not accessible in the code. `import angular from 'angular'; // angular modules import constants from './constants'; import onConfig from './on_config'; import onRun from './on_run'; import 'angular-ui-router';...
set_clip_path on a matplotlib clabel not clipping properly

I'm making a contour plot that is clipped to a polygon path: import matplotlib.pyplot as plt from matplotlib.patches import Polygon import numpy as np fig = plt.figure() axes = plt.subplot() x,y = np.meshgrid( np.linspace(-10,10,51), np.linspace(-10,10,51) ) z = np.sin(np.sqrt(x**2+y**2)) CS = axes.contour(x, y, z, np.linspace(-1,1,11) ) axes.set_aspect('equal') # clip contours by polygon radius = 8 t = np.linspace(0,2*np.pi,101)...
Programmatically determine best foreground color to be placed onto an image
I'm working on a node module that will return the color that will look best onto a background image which of course will have multiple colors. Here's what I have so far: 'use strict'; var randomcolor = require('randomcolor'); var tinycolor = require('tinycolor2'); module.exports = function(colors, tries) { var topColor, data = {}; if (typeof colors == 'string') { colors = [colors]; } if (!tries) { tries = 10000; } for (var t = 0; t < tries; t++) { var score = 0, color = randomcolor(); //tinycolor.random();...
GridGroupHeaderItem.AggregatesValues without Eval

In telerik documentation, It's say that aggregates values are store in the AggregatesValues. They even use it in the exemple. But I find it impossible to prove. As everying is true until proven wrong .. right?Let me provide you a Minimal, Complete, and Verifiable example. So you could point my mistake. Aspx : <telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource" AllowPaging="True" ShowGroupPanel="True">...
Android: make interaction to switch between activity like Chrome's Tab Management

Can anyone give me an example, how to create chrome like switching between tabs? I want to make my application to have multiple tab. These tabs can be switched like chrome does. Must I do snapshot on onPause, and then on switching activity display it? Any Android Native API about this feature? As mentioned by jared rummler https://github.com/vikramkakkar/DeckView is good enough. But, how the best way to use this. Should I get screenshot...
Django ORM: Override related_name of Field in Child Class
I get this exception: django.core.exceptions.FieldError: Local field 'ticket' in class 'SpecialPlugin' clashes with field of similar name from base class 'BasePlugin' Here are my models: class BasePlugin(models.Model): ticket = models.OneToOneField('foobar.ticket', primary_key=True, related_name='%(app_label)s_%(class)s') class Meta(IndexImplementation.Meta): abstract = True # .. Other stuff which should be available for SpecialPlugin # and other...
Xamarin sider.dll missing

I've upgraded and downgraded my project, now do I get an error message that my Sider.dll is missing. Severity Code Description Project File Line Suppression State Error Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'Sider, Version=0.9.3.42023, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile? Bestandsnaam: Sider.dll ...
Break a loop inside a animation block
I'm trying to break a for-loop after a completed UIView animation. Here is the following snippet: public func greedyColoring() { let colors = [UIColor.blue, UIColor.green, UIColor.yellow, UIColor.red, UIColor.cyan, UIColor.orange, UIColor.magenta, UIColor.purple] for vertexIndex in 0 ..< self.graph.vertexCount { let neighbours = self.graph.neighborsForIndex(vertexIndex) let originVertex = vertices[vertexIndex] print("Checking now Following neighbours for vertex \(vertexIndex): \(neighbours)")...
Wednesday, March 29, 2017
Associating a paper-radio-button (wrapped by a div) with a paper-radio-group?
I can associate multiple paper-radio-buttons within a group by having the buttons be direct children of a paper-radio-group. <paper-radio-group selected="{{someProperty}}"> <paper-radio-button name="foo">Foo</paper-radio-button> <paper-radio-button name="bar">Bar</paper-radio-button> <paper-radio-button name="baz">Baz</paper-radio-button> </paper-radio-group> However, if I wrap one of the paper-radio-buttons with a div like this, it loses association with the group...
Android Studio - Find in Path error
In Android Studio 2.2.2 in Find in Path I was trying search for the string String params[] so I typed it into the "Text to find:" box and I got the error Bad pattern "String params[]" unclosed character class What does this mean and how do I search for my string? 4 AnswersAnswers 1 You have 'regular expressions' checked, so you're looking for that pattern. See this. Uncheck that and see if it helps. Answers 2 First the Android Studio nice for search whole project, As mentioned those question 'Find...
Yarn slave nodes are not communicating with master node?
I am not able to see my nodes when I do yarn node -list, even though I have configured /etc/hadoop/conf/yarn-site.xml with the correct properties (it seems to me, at least according to this question Slave nodes not in Yarn ResourceManager). Here's what I've done so far: installed resourcemanager on the master installed nodemanager on the slaves checked yarn-site.xml for this on ALL the nodes: <property> <name>yarn.resourcemanager.hostname</name> <value>master-node</value> </property>...
Different width and height from DisplayMetrics and $(window).width() in WebView

Inside an Android app, I tried using the following way to obtain the screen width and height: DisplayMetrics metrics = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(metrics); final int screenWidth = metrics.widthPixels; final int screenHeight = metrics.heightPixels; This reports 1080 and 1920 respectively for my phone, which matches the specs. However, inside a webview, when I used:...
Ignore or not API endpoint parameters based on access level
I am working on an API endpoint that returns a list of products: "api/products" The endpoint accepts the following parameters: page_size page_number Each product has a boolean property named IsApproved. In the web application used by common users I always want to return only the Approved products ... On the web ADMIN application used by administrators I want to return all products, Approved or Not ... My idea would be to add a new parameter (enumeration) named: ApprovedStatus And the values would be Approved,...