back soft

مطالب مرتبط با «using» در back soft | نویسنده: استخدام کار

Html5 Context('2d') when using fill background , drawImage setting the image rectangle on top right

Vote count: 0 i have simple html which draws yellow rectangle on top of it i draw image to draw png image with transparency , the problem is that when i do that , the there is some image rectangle on top right which i don't know from where it come . And here is the code : Test body { background-color: lightblue; } html, body { width: 100%; height: 100%; margin: 0; padding: 0; } div { -webkit-user-select: none; /* webkit (safari, chrome) browsers */ -moz-user-select: none; /* mozilla browsers */ -khtml-user-select: none; /* webkit (konqueror) browsers */ -ms-user-select: none; /* IE10+ */ } #gameAreaWrapper { position: absolute; top: 0; left: 0; opacity: 0; } var cv; var context; var playerIm...

ادامه مطلب

R: How to apply a function that outputs a dataframe to multiple columns using dplyr?

Vote count: 0 I want to find correlations, p-values and 95% CI between one specific column and all other columns in a dataframe. The 'broom' package provides an example how to do that between two specific columns using cor.test with dplyr and pipes. For mtcars and, say, mpg column we can run a correlation with another column: library(dplyr) library(broom) mtcars %>% do(tidy(cor.test(.$mpg, .$cyl))) estimate statistic p.value parameter conf.low conf.high 1 -0.852162 -8.919699 6.112687e-10 30 -0.9257694 -0.7163171 The output is a single-row dataframe. I would like to run cor.test for mpg with each column so that that the output for each column goes into a separate row. The desired output would...

ادامه مطلب

Pass text value for each empty field using XSLT

Vote count: 1 I created one XSLT with all kinds of validations etc. Now my client wants me to pass XXX for every blank value. There are lot of fields and I don't wan't to do it manually for each field. Can yo please help. Below is my XSLT | | | | | | |...

ادامه مطلب

Unexpected Field Error Using Multer in NodeJS

Vote count: 0 The Error: Error: Unexpected field at makeError (c:UsersDevWebstormProjectsCrunchnode_modulesmulterlibmake-error.js:12:13) at wrappedFileFilter (c:UsersDevWebstormProjectsCrunchnode_modulesmulterindex.js:39:19) at Busboy. (c:UsersDevWebstormProjectsCrunchnode_modulesmulterlibmake-middleware.js:97:7) at Busboy.emit (events.js:118:17) at Busboy.emit (c:UsersDevWebstormProjectsCrunchnode_modulesmulteode_modulesbusboylibmain.js:31:35) at PartStream. (c:UsersDevWebstormProjectsCrunchnode_modulesmulteode_modulesbusboylibtypesmultipart.js:205:13) at PartStream.emit (events.js:107:17) at HeaderParser. (c:UsersDevWebstormProjectsCrunchnode_modulesmulteode_modulesbusboynode_modulesdicerl...

ادامه مطلب

Entity Framework 6 Using Lambda GroupBy on a joined table

Vote count: 0 I have two tables, Drivers and ViewDrivers that I have joined together using the following lambda expression in Entity Framework 6. var inAppDriverList = context.ViewDrivers .Select(dv => new { dv.TerminalCode, dv.EmployeeId }) .Join( context.Drivers, d => d.EmployeeId, dv => dv.EmployeeId, (d, dv) => new { d, dv } ) .OrderBy(dv => dv.TerminalCode) .GroupBy(dv => dv.TerminalCode) .ToList(); It does give me the data that I am expecting to get, but I when I try to Sort and Group the list by the TerminaleCode using GroupBy and OrderBy, I caot get it to work correctly. I have tried everything I can think of, with no luck. I am only having this issue when I am trying to sort a joine...

ادامه مطلب

pip install using proxy in a virtual environment

Vote count: 0 I work on a Ubuntu VM in my company's laptop which uses proxy server for coecting to inteet. After some research I found out how to install modules using pip install with proxy. For example, using this command I can install my virtualenv module: sudo pip install --proxy=http://user:pass@: virtualenv However, after creating a virtual environment folder, activate it and then install a module using this pip command: pip install --proxy=http://user:pass@: pyperclip I get this error: Retrying (Retry(total=4, coect=None, read=None, redirect=None)) after coection broken by 'ProxyError('Caot coect to proxy.', OSError('Tuel coection failed: 407 Proxy Authentication Required',))': /simpl...

ادامه مطلب

How to install elasticsearch as a service using brew

Vote count: 0 I want to use brew to install elasticsearch but I don't succeed to install it as a service to be able to start it like: sudo service elasticsearch start and to be able to stop it like: sudo service elasticsearch stop Do you know how I can do it? asked 1 min agomel Let's block ads! بخوانید...

ادامه مطلب

How do I create a new dataframe using grouped output from another dataframe?

Vote count: 0 I have tick data containing symbols, bid prices, and ask prices. I was able to find the average spread and standard deviation of each symbol. I'd like to create a confidence interval for each symbol and have the final DataFrame output have the columns ticker symbol average spread lower bound 95% confidence upper bound 95% confidence How can I do that? This is how far I've been able to get: df = pd.read_csv('C:\Users\William\Desktop\tickdata.csv', dtype={'ticker': str, 'bidPrice': np.float64, 'askPrice': np.float64, 'afterHours': str}, usecols=['ticker', 'bidPrice', 'askPrice', 'afterHours'], nrows=3000000 ) df = df[df.afterHours == "False"] df = df[df.bidPrice != 0] df = df[df....

ادامه مطلب

how to create a html form using PHP 7 to send data to a mysql database?

Vote count: 0 Is it really diferent from PHP 5... I have this code that gives me a Parse error: syntax error, unexpected 'New' (T_NEW) in /home/u670931909/public_html/php.php on line 16 PHP code:...

ادامه مطلب

Why does the change in global value not reflected in the function when using Pool?

Vote count: 0 I have a code in which I am implementing multi-threading in Python 2.7. However there is one global value which refuses to change. Even after explicitly changing it, when I call the function, the initial value is retained. Can anyone tell me a way around or why is this happening? Here is a an example. The value of y in the function f does not seem to change even after changing it. from multiprocessing import Pool global y y=10 def f(x): retu x*y def doMultithreading(): p = Pool(5) print(p.map(f, [1,2,3,4,5])) y=20 print y print(p.map(f, [1,2,3,4,5])) if __name__ == '__main__': doMultithreading() The output is [10, 20, 30, 40, 50] 20 [10, 20, 30, 40, 50] Ideally isn't it reasona...

ادامه مطلب

Forecasting revenue using Monte Carlo Simulation in R

Vote count: 0 I am trying to forecast revenue for a bank using Monte Carlo Simulation. Revenue is defined as- Revenue=A * B * C * D I am absolutely new to this method. From what I have read, I am plaing to check the distribution for each of the independent variables using fitdistplus package in R. Then, for each of these dependent variable, I will generate random numbers basis the best distribution. Is this the right way to go about this problem? Also, how do I run the simulation? Any help or references on how to proceed will be really appreciated. asked 1 min agouser1463242 Let's block ads! بخوانید...

ادامه مطلب

how to add subservices in add to cart using asp.net mvc and jquery

Vote count: 0 var sum = 0; $(".cart-count").data('count', 0); $(document).ready(function () { $(".add_to_cart_button").click(function () { var id = $(this).data("id"); $('#' + id).prop("disabled", "disable"); var vender = $(this).data("vender"); var price = $(this).data("price"); var service = $(this).data("service"); sum = sum + parseInt(price); var div = $('', { id: 'kart_' + id, class: 'kartcontainer', text: service + " : " + price, }); var buttun = $('', { type: 'button', 'data-price': +price, 'data-vend': vender, 'data-ser': service, class: 'removeFromKart', value: 'X', on: { click: function () { sum = sum - parseInt(price); $('#' + id).removeAttr("disabled"); $(this).closest("div").rem...

ادامه مطلب

Using iterative DataFrame values for Coordinate matrix coordinates (pyspark, mllib)

Vote count: 0 I have a K,V DataFrame 'animals_fruits' which looks like this: DataFrame[animal_id: bigint, fruit_id: bigint]. The purpose is matching animals with foods that they eat. I want to build a binary matrix using the derived vectors from this matrix. E.G [animal_id:1, fruit_id:3] 0 0 0 0 0 0 1 0 0 I've defined the following arrays to iterate through: a = animal_fruits.select(animal_fruits.animal_id).map(lambda v: (v.animal_id)) b = animal_fruits.select(animal_fruits.fruit_id).map(lambda v: (v.fruit_id) Here's some sample output: a.take(5) [36566, 41366, 30620, 64820, 30755] Now, I'd like iterate through animals_fruits and take each value of a,b as coordinates for the matrix: def frui...

ادامه مطلب

"Connectivity failure" using Visual Studio 2015's Remote GDB Debugger

Vote count: 0 I am trying to build and test Linux applications using Visual Studio 2015, but I couldn't get the remote GDB Debugger to work. Here's what I've done: I've set up a virtual machine ruing on Xubuntu with the IP 192.168.1.7 and run gdb server with the command: gdbserver --multi HOST:4378 On Visual Studio, I clicked on Remote GDB Debugger and here is what I've typed in: Host name: 192.168.1.7Port: 4378User name: testAuthentication type: Password Password: test When I coect, gdbserver on Xubuntu shows: Remote debugging from host 192.168.1.5 On the Visual Studio however, nothing happened until after a while, it says Coection failure. Please make sure host name and port number are cor...

ادامه مطلب

Wrong content upon accesing/using an assoziative array in PHP

Vote count: 0 all the day long I'm trying to overcome a bug in one of my PHP scripts. This is a strange behavior that i can't explain. Please help me. First of all: $php -v PHP 7.0.7 (cli) (built: May 25 2016 18:40:26) ( NTS ) In my script I run a MySQL query, which is succeeding. Second i do this: while ($z = mysqli_fetch_array($req)) { if (!isset($datenGraph[$z[0]])) { $datenGraph[$z[0]] = []; } //just fill the array with zeros before and after the result while (count($datenGraph[$z[0]]) < ($z[2] - 1)) { array_push($datenGraph[$z[0]], 0); } array_push($datenGraph[$z[0]], (int)$z[3]); } foreach ($datenGraph as $key => &$value) { while (count($value) < 12) { array_push($value, 0); } } Howeve...

ادامه مطلب

rails nested resource: Move from child/show.html to parent/show.html using link_to or other Not Working

Vote count: 0 I have a phones resource nested within a user one, and each have independent views. I can use link_to to get to the nested resource, phones, but am unable to go back in the opposite direction and link back to user views from within a phone view. I have tried nearly every command I could find on google, such as link_to, url_for, polymorphic_url, all without success. Thanks Wex asked 2 mins agoW. Wuffley Let's block ads! بخوانید...

ادامه مطلب

Remove replace pipe (|) symbol with comma (,) symbol in spark using python

Vote count: 0 this myRDD data for 2 rows [u'#fields:excDate|schedDate|TZ|custID|muID|tvID|acdID|logonID|agentName|modify|exception|start|stop|LS Oracle Emp ID|Team Lead', u'06152016|06152016|CET|3|3000|1688|87||Ali, AbdElaziz|1465812004|Open|08:00|09:00|101021021|ElDeleify,Hisham'] How to replace the | with , so that i can build the dataframe. Is their any better way to build the Dataframe with such data. ? asked 4 mins agoSamir Matkar 1 Answer Vote count: 0 >>> data = [u'#fields:excDate|schedDate|TZ|custID|muID|tvID|acdID|logonID|agentName|modify|exception|start|stop|LS Oracle Emp ID|Team Lead', u'06152016|06152016|CET|3|3000|1688|87||Ali, AbdElaziz|1465812004|Open|08:00|09:00|101021021|ElD...

ادامه مطلب

Getting an tapped row data in to next view controller using accessorybuttontappedforrowwithindexpath

Vote count: 0 Am new ios development,so i have little bit knowledge about this.And my question is,in uitableview selected row data is edit and update using accessorybuttontappedforrowwithindexpath. asked 5 mins agoPreetha Preetha Let's block ads! بخوانید...

ادامه مطلب

Can I work on MVC 4 using Visual Studio 15 Preview?

Vote count: 0 Can I work on old ASP.NET MVC 4 projects using Visual Studio 15 Preview? If so, would VS 15 update the project/project file? I don't want to mess up my old projects by opening them in VS 15. asked 1 min agoSam Let's block ads! بخوانید...

ادامه مطلب

Create multiple plugin in a single placeholder in django cms when using default plugins

Vote count: 0 How can I create multiple plugin in a single placeholder in django cms if I am using default plugins which django cms provide? asked 3 mins agoAkshay Sharma Let's block ads! بخوانید...

ادامه مطلب