2018-10-22         Stan

asp.net remove unused httpmodules

I am looking at the performance suggestions lots of pages have about asp.net. Specifically the remove unused httpmodules part: <httpModules> <add name="OutputCache" type="System.Web.Caching.OutputCacheModule"/> <add name="Session" type="System.Web.SessionState.SessionStateModule"/> <add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule"/> <add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule"/> <add name="PassportAuthentication" type="System.Web.Security.PassportAuthentic...

 asp.net                     1 answers                     49 view
 2018-10-22         Stan

SVG and Javascript - Creating a SVGPoint - TypeError: Illegal constructor

I'm trying to create an SVG polygon from with Javascript.When I try to creating an SVGPoint with this Javascript code:var p = new SVGPoint();I'm getting the following message:- TypeError: Illegal constructor From your SVG document you need to call .createSVGPoint() to create a new point (initlaized at 0,0), like this:var p = svgRoot.createSVGPoint();SVGPoint (the interface itself) has no constructor, that's why you're getting an error currently. [XXX]Also you can try to use Raphaël javascript library that implement alternative SVG API and can emulate SVG in InternetEx...

 javascript                     2 answers                     21 view
 2018-10-22         Stan

Saving video from UIImagePickerController

In my application, the user can record a video using the UIImagePickerController, and I need to save it to disk for later use. I've gotten the path out of the info dictionary and I'm going to save it to my documents directory, but the problem I'm having is that the URL passed in the dictionary is just that - a URL and not a file path. When I convert it to a string using absoluteString and pass that as the source path to my file manager, it fails saying the source file wasn't found.Old Path: file://localhost/private/var/mobile/Applications/77B4D2B8-DE12-4643-82F0-2ECC948E4DB...

 nsurl                     2 answers                     83 view
 2018-10-22         Stan

separating date and time column in data frame in r

I am trying to separate my DATE column in my data frame which has the date stored as %y%m%d %h%m%s , however when I try to using the separate function, as well as following the instructions in the links below, I get NAs... How can I resolve this problem?r how to separate date time data typessplitting date and time in data frameSample Datastructure(list(STATION_NAME = c("PHILADELPHIA INTERNATIONAL AIRPORT PA US", "PHILADELPHIA INTERNATIONAL AIRPORT PA US", "PHILADELPHIA INTERNATIONAL AIRPORT PA US", "PHILADELPHIA INTERNATIONAL AIRPORT PA US", "PHILADELPHIA INTERNATIONAL AIRP...

 r                     4 answers                     63 view
 2018-10-22         Stan

Can Some give an elaborate example of using Custom Jasmine Reporter for protractor. I am unable to understand Tutorial

Can Some give an elaborate example of using Custom Jasmine Reporter . I would like someone to help me with a sample test with two assertions . how to add the reporter in protractor conf.js and how it can help me . No where in the internet there is a example apart from just the reference . check the one I use:First check if all the necessary dependencies are installed (check the begin of the code)Then copy+paste this to you Conf.js://In my case I installed the dependencies locally thats why comes from lib foldervar jasmineReporters = require('./lib/node_modules/jasmine-...

 javascript                     2 answers                     91 view
 2018-10-22         Stan

Django TypeError: render() takes 2 positional arguments but 3 were given?

I am sending an email to my drivers from my employee site but I am not able to send a driver id with the url link. I get the error:join_message = template.render(ctx, request)**TypeError: render() takes 2 positional arguments but 3 were given**My view:def rentacar_carapp_approve(request): if request.POST: try: args['driver'] = driver = Driver.objects.get(id=request.POST.get('driver_id')) subject = "Please Register Your Car" from_email = settings.EMAIL_HOST_USER to_email = 'bakrshk@gmail.com' if to_email is not...

 python                     3 answers                     70 view
 2018-10-22         Stan

Threading - Producers/Consumers with a Counter object

I have written a code snippet below that aims to achieve the following. I have a counter object that is shared between all of the consumers, these consumers, upon completion of their task, increment the counter and wait patiently. The idea is to create a new ip address that the other threads can then use in their new task, this will be done by the producer, who also checks if the counter is of some value, and if it is, it will create a new ip and notify everyone, otherwise notify everyone without creating a new ip. But for some reason, I never get the NOT SETTING A NEW IP A...

 python                     1 answers                     83 view
 2018-10-22         Stan

How to convert a matplotlib.pyplot to a bokeh plot

I have been reading today about how to render a matplotlib.pyplot in a Django template.I found bokeh library and I was trying to convert my matplotib in a valid input to bokeh components. I read .to_boke method is deprecated. datos = np.random.randn(1000) ## Discretizamos el conjunto de valores en n intervalos, ## en este caso 8 intervalos datosbin = np.histogram(datos, bins=np.linspace(np.min(datos), np.max(datos), 9))[0] ## Los datos los queremos en tanto por ciento datosbin = datosbin * 100. / len(d...

 django                     1 answers                     75 view
 2018-10-22         Stan

EXC_BAD_ACCESS issue debugging

I sometimes get EXC_BAD_ACCESS without knowing the source.I enabled Zombies and this is now what I get on the console:2018-08-27 18:37:41.785523+0530 MyProject[3419:1228271] *** -[MyProject.VideoLibrary retain]: message sent to deallocated instance 0x103078200VideoLibrary is the name of controller and I am not sending any retain messages. How do I go further to identify the issue and fix it? I am using Swift 4.0 if that matters. When I want to have more information about a crash, I create an exception breakpoint.You can add one from the breakpoint navigator by clicking o...

 ios                     1 answers                     40 view
 2018-10-22         Stan

Why adding extra one layer of SELECT resolve Mysql error code :1235

In one of my previous question, I have asked solution for resolving mysql 1235 error: Error Code: 1235. This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'Following will throw 1235 : DELETE FROM job_detail_history where id not in (select id from job_detail_history order by start_time desc limit 2);For that i got the solution which is given by @Zaynul Abadin Tuhinas follows and it works for me too. He just added one single select layer over my subquery. and as per him it is suggested by some mysql experts.Resolution For above problem: D...

 mysql                     1 answers                     57 view
 2018-10-22         Stan

Creating database tables with "either or" type fields

I have a database that tracks players through their attempts at a game. To accomplish this, I keep a table of users and store the attempts in a separate table. The schema for these tables is:CREATE TABLE users ( id BIGINT PRIMARY KEY, -- the local unique ID for this user name TEXT UNIQUE, -- a self-chosen username for the user first_name TEXT, -- the user's first name last_name TEXT, -- the user's last name email TEXT, -- the user's email address phone TEXT -- the user's phone number);CREATE TABLE trials ( timestamp TIMESTAMP PRIMARY KEY, -- the time the tri...

 sql                     4 answers                     10 view
 2018-10-22         Stan

Best primary key format for large table

I'm developing an asp.net application that has some potentially large data tables. I would like to know what would be the best way to define a primary key. I know this has been asked before, but since this is for a specific situation, I think the question is valid.I'm using Entity Framework 4 on a SQL server 2008 database.What are the possibilities for defining a primary key, considering the following:There is a real possibility that over time the number of records will exceed the 32 bit boundary, so an auto-increment integer will not be possible.There is no possibility to ...

 c#                     3 answers                     18 view
 2018-10-22         Stan

Django App Improperly Configured - The app module has multiple filesystem locations

I think I've really screwed something up. On my django app (the production one) I pushed a major update and am get an "Internal Server Error" whenever I try to go to my domain. I am getting an error in my uwsgi logs:*** Starting uWSGI 2.0.8 (64bit) on [Thu Jan 29 00:36:43 2015] ***compiled with version: 4.8.2 on 11 December 2014 17:29:38os: Linux-3.13.0-41-generic #70-Ubuntu SMP Tue Nov 25 14:40:34 UTC 2014nodename: ip-172-31-9-208machine: x86_64clock source: unixdetected number of CPU cores: 1current working directory: /detected binary path: /usr/local/bin/uwsgi!!! no inte...

 django                     2 answers                     13 view
 2018-10-22         Stan

Get storage type if disk of vm is premium or standard using get-azurermvm

Team,Thanks in advance, I'm an IT pro and writing a script which gives the output of vm name, vm size, and the data disk size which is attached. Below is the command which I'm using for unmanaged and managed disk vm both. I wanted to know if i can use the get-azurermvm somehow to get the details of the disk type which is attached if it is SSD or HDD? $allvm = Get-Azurermvm | ForEach-Object { $props = [ordered]@{ "Name" = $_.name "Disk Size" = $_.StorageProfile.DataDisks.disksizegb "VM Size" = $_.HardwareProfile.Vm...

 azure                     2 answers                     38 view
 2018-10-22         Stan

DAX Formula for running total BUT only for a certain column

I've managed to get my running total working for a date when using all values in a column, and I have a date table to table relationship setup as well. My issue goes a bit more into getting it to work for only specified column values of my main table. I can't provide the actual table due to confidentiality however I can provide an example of what its like.My table currently has multiple useless columns in regards to the running total. It however is based of a Date that I have setup. There is another column with values a, b, c in it. I only want to run a running total of val...

 powerbi                     1 answers                     31 view
 2018-10-22         Stan

How to add increasing margin sizes to a row of buttons?

I am trying to create a row of buttons which have increasing margin-left sizes. For example:[b1]--[b2]-----[b3]-------[b4]let '-' be whitespace. I couldn't figure out the formatting to have consecutive spaces on stackoverflow... As you can see, b1 will have a margin-left of 10%, b2 20%, b3 40% and b4 80%.However, it looks like the margin-lefts are accumulating such that b2 will have a total margin-left of 30% and b3 a total of 70% and so on...My objective is to have each button be positioned a certain distance away from the very left of the screen. I am trying to accomplish...

 html                     2 answers                     8 view

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