back soft

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

Hibernate - persisting collection of @OneToMany entities

Vote count: 0 I wanted to map a simple parent-child relationship. @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, mappedBy = "mother") public Set getChildren() { retu children; } @ManyToOne(fetch = FetchType.EAGER, cascade = CascadeType.ALL) @JoinColumn(name = "MOTHER_ID") public User getMother() { retu this.mother; } Test case: @Test public void t4adopt() { User ewa = session.find(User.class, 1L); User user = new User("abel", "abel@garden.com"); session.persist(user); ewa.getChildren().add(user); System.out.println("save eva's children"); session.saveOrUpdate(ewa); //session.save(user); session.flush(); System.out.println("4. " + ewa); session.refresh(user); System.out.printl...

ادامه مطلب

TypeError: 'NoneType' object is not iterable. Why do I get this error?

Vote count: 0 The function compute_root uses Newton's method of successive approximation to find good enough approximations of the zeroes of polynomials (herein lies the problem). The function evalPoly computes the value of a polynomial at a particular x value, and the function ddx2 computes the derivative of a polynomial. poly2 = (2,3,1,5) #poly2 represents the polynomial 5x^3+x^2+3x+1 def evalPoly(poly,x): degree = 0 ans = 0 for index in poly: ans += (index * (x**degree)) degree += 1 retu ans retu degree def ddx2(tpl): lst = list(tpl) for i in range(len(lst)): lst[i] = lst[i]*i if i != 0: lst[i-1] = lst[i] del lst[-1] tpl = tuple(lst) def compute_root(poly,x_0): epsilon = .001 numGuesses =...

ادامه مطلب

kafka on kubernetes cannot produce/consume topics (ClosedChannelException, ErrorLoggingCallback)

Vote count: 0 I run 1 kafka and 3 zookeeper-server in docker on kubeetes following this instructioninstruction. I caot produce/consume topics outside pod(docker container). bin/kafka-console-producer.sh --broker-list 1.2.3.4:9092 --topic [2016-06-11 15:14:46,889] ERROR Error when sending message to topic test with key: null, value: 3 bytes with error: (org.apache.kafka.clients.producer.inteals.ErrorLoggingCallback) org.apache.kafka.common.errors.TimeoutException: Batch containing 3 record(s) expired due to timeout while requesting metadata from brokers for test-0 bin/kafka-console-consumer.sh --zookeeper 5.6.7.8:2181 --topic test --from-begiing [2016-06-11 15:15:58,985] WARN Fetching topic m...

ادامه مطلب

ASP.Net interface with SQL Server Back end (preferably use C#)

Vote count: -4 Please go through the following description & prepare ASP.Net interface with SQL Server Back end (preferably use C#). Create an application to Add / Delete/ Modify Employee’s details using a web application. 1. Create New Database in SQL server. a. Database Name: Create new database with the name as “Test_Database” b. Server Name: c. Useame: d. Password: Table Layout: Sr No Field Name Data Type / Size 1 Employee ID(Pkey) Integer 2 Employee Name NvarChar(100) 3 Email NvarChar(50) 4 Address NvarChar(250) 5 Phone Number NvarChar(50) asked 3 mins agoshubham Let's block ads! بخوانید...

ادامه مطلب

Responsive menu in asp.net data from database

Vote count: 0 how to add menu for asp.net Content management system application in responsive bootstrap ,menu data retrieve from database with menu order. asked 1 min agonataraj ragavan Let's block ads! بخوانید...

ادامه مطلب

Not able to connect to server through java code. Getting javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

Vote count: 0 I am trying to build a Test Automation Tool for REST API on AWS using rest-assured framework. I just tried with a simple HTTP POST and checking the output JSON body. But when I run that in Eclipse I get SSLHandshakeException. I did try to look into the issue and found it could be something related to server certificate (Received fatal alert: handshake_failure through SSLHandshakeException) but when I test it through POSTMAN it is ruing fine and gives desired output. Also if I hit the URI through the browser does gets the response from the server(Error message). I am novice to SSL programming and will like to know what could be the root cause behind it and how I can fix that and...

ادامه مطلب

CGContextFillRects vs CGContextAddLineToPoint (rects vs lines) performance

Vote count: 0 I have a object that renders a grid of lines (used for a plot object I am working on) that will update frequently and shift all the lines around. If the grid will update at 60 fps would using CGContextFillRects or CGContextAddLineToPoint (rectangles vs lines) be more efficient? Let's assume I am going to implementing things in a pretty efficient way. For example with the line technique I would use CGContextMoveToPoint and CGContextAddLineToPoint before stroking the entire grid line in one go with CGContextStrokePath. For both techniques I will generate the data required to draw my shapes somewhere other than the drawRect method. Initially I feel like CGContextFillRects is bette...

ادامه مطلب

ReflectionTypeLoadException on Me.Adapter.Fill(dataTable) when upgraded from .Net Framework 3.5

Vote count: 0 Upgrading from Net Framework 3.5 to 4 or 4.5 or 4.6 , my code hangs on a trivial Me.Adapter.Fill(dataTable) statement. If I run my code on x86 Platform, code hangs without error. If I pause compile procedure I can find it blocked in this statement. But if I run it on x64 Platform stops in same code with a ReflectionTypeLoadException occurred Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information (Break on CLR enabled), but then compiles ok. Also compiles on x64 with visual studio hosting process enabled. What happened? asked 1 min agoanefeletos Let's block ads! بخوانید...

ادامه مطلب

Jenkins Docker in Docker on GCP/Kubernetes

Vote count: 0 Is there a recommended way of initiating 'docker build' commands from a container loaded in to Kubeetes? IE. Spiing up a Jenkins container (from the community image) and then ensuring that docker is installed within that container so you can issue 'docker build' commands. I've read up on various methods such as DIND (Docker in Docker) containers and ruing links between the Jenkins container and the DIND container. Of course with Kubeetes this would be different. asked 1 min agoeggsy84 Let's block ads! بخوانید...

ادامه مطلب

error deploying dns in kubernetes

Vote count: 0 when I run sudo ./deployAddons.sh under kubeetes/cluster/ubuntu I get the following: replicationcontroller "kube-dns-v14" created The Service "kube-dns" is invalid. spec.clusterIP: Invalid value: "192.168.3.10": provided IP is not in the valid range Where to set this?(which file) and what variable to set? asked 1 min agouser1870400 Let's block ads! بخوانید...

ادامه مطلب

How to specify alias on YamlMember in YamlDotNet?

Vote count: 0 I need to deserialize the following YAML to my custom type. YamlAlias attribute seems to be obsolete, so I replaced it with YamlMember. It fails on deserializing the following YAML with the below exception: host: properties: mem_size: 2048 MB YamlDotNet.Core.YamlException : (Line: 21, Col: 13, Idx: 524) - (Line: 21, Col: 13, Idx: 524): Exception during deserialization ----> System.Runtime.Serialization.SerializationException : Property 'mem_size' not found on type 'Toscana.Domain.HostProperties'. public class Host { public HostProperties Properties { get; set; } } public class HostProperties { [YamlMember(typeof(DigitalStorage))] public string MemSize { get; set; } } asked 1 mi...

ادامه مطلب

Hadoop: java.net.ConnectException: Connection refused

Vote count: 0 Hello I have been trying to follow this tutorial: http://www.tutorialspoint.com/apache_flume/fetching_twitter_data.htm for a very long time now and I am absolutely stuck at Step 3: Create a Directory in HDFS. I have ran start-dfs.sh and start-ya.sh and both seem to have worked correctly as I am getting the same output as the tutorial but when I try to run: hdfs dfs -mkdir hdfs://localhost:9000/user/Hadoop/twitter_data I keep receiving the same error: mkdir: Call From trz-VirtualBox/10.0.2.15 to localhost:9000 failed on coection exception: java.net.CoectException: Coection refused; For more details see: http://wiki.apache.org/hadoop/CoectionRefused I can not figure out why as I ...

ادامه مطلب

New to Tensorflow - trying to repurpose an MNIST multilayer network to a calculator

Vote count: 0 Could someone help or guide me through what I should do better in order for this to work? I changed the number of inputs to 2 and generated some random data, "x1" and "x2" (one number to be added to another). The idea is to use variables "add" and "mul" as the real output and base the cost (variable "Y") off of that, but I'm having trouble manipulating the data so it inputs properly. I tried to make another variable with x = tf.Variable([100 * np.random.random_sample([100]), 100 * np.random.random_sample([100])) and a few other alteative ways, but that caused errors. Also, if there's anything else wrong in my code, please critique it! Anything helps. Thank you. ''' A Recurrent ...

ادامه مطلب

.net cli RC2 pkg installer is broken for Mac

Vote count: 0 just tried to setup .Net debugger on VSCode on a mac ... and failed followed pretty solid advice here https://github.com/gregg-miskelly/omnisharp-vscode/blob/daily-build-docs/debugger.md seems the latest RC2 package for Mac is corrupted or something only 19MB. And have no clue who is in charge of it... where to report it. Any advice on how to ask for a proper package? asked 4 mins agopaul Let's block ads! بخوانید...

ادامه مطلب

How do I persist data in memory with .net rest api

Vote count: 0 I am new to C# rest API, I have a collection of data that is created when the user POST data into my REST api, What is the best way to keep this data in memory ? The data is stored in a c# collection. I do not have a database to store this day, it must stay in memory for the life of the application. I hope this is enough information for you guys to point me in the right direction. asked 1 min agoPacman Let's block ads! بخوانید...

ادامه مطلب

How do I make sure the value is set on the line that I am on in Netsuite Onfieldchange

Vote count: 0 In netsuite I am trying to automatically calculate the margin on the item sublist on a sales order and set a price level based off of the nearest margin and then show the cost and price level to the user. I have everything working except if the user enters in a margin, and then clicks off onto another row, then it adds the calculated average cost and price level to the row that you clicked on rather than the row the information was added to. How do I guarantee that it adds the value to the line I enter the margin in on? if(name =='custcol61' ) { var margincalcfield = nlapiGetCurrentLineItemValue('item', 'custcol61'); if( margincalcfield >0 && margincalcfield*1 == margincalcfiel...

ادامه مطلب

js datatables.net delete row from table base on rowIdx

Vote count: 0 Hi I want to delete rows from table according to its rowidx but its not going on! I want to delete all rows with status 777 I writed the following js code for deleting the row refreshTableByName: function (table) { $(table).DataTable().rows().every(function (rowIdx, tableLoop, rowLoop) { var row = this.data(); if (typeof row.Status != 'undefined'){ if(row.Status == 777) $(table).DataTable().row(rowIdx).remove().draw(); } else { this.data(row).draw(); } }) }, what wog with that ? I newer to datatables so I'm tring to googeld a lot but nothing help me.. I would happy to any help:) asked 2 mins agouser1 Let's block ads! بخوانید...

ادامه مطلب

My MAC is connected to both Ethernet and Wifi at time,how can i detect from which network is getting acessed

Vote count: 0 My MAC is coected to Etheet and Wifi at a time. Both are different networks. I wanted to know from which interface my system is accessing inteet. I want a command to check this. By giving traceroute google.com , i can get default route, as i know ip addresses of both networks. But the case is how can i detect this in remote machines whose ip addresses are unknown when i give ifconfig I see en0 and en1 are assigned with two diff ips and are active. Even from this i am unable to differentiate. asked 3 mins agosyammala Let's block ads! بخوانید...

ادامه مطلب

angular js, asp.net mvc : Does $http works only with ApiController but not with normal Controller?

Vote count: 0 I am trying to develop a simple form using angular js 1.* and asp.net mvc 5. When I try to save the form data using $http(), it hits the action but none of the data is passed. But if I use $.post(), it works perfectly. Could anybody please explain me why? Is that because we need to use ApiController instead of normal mvc's Controller? Or what could be the potential problem? AddEmployeeController.js (function () { 'use strict'; angular.module('ApplicationModule').controller('AddEmployeeController', function ($scope, SPACRUDService) { $scope.Id = 0; $scope.employee = { FirstName: 'Hello', MiddleName: '', LastName: '', CurrentAddress: '', PermanentAddress: '', Gender: 'M', MobileP...

ادامه مطلب

Using System.Net.FTP, how can I get my process to 'release' an uploaded file so attributes are updated (without exiting first)

Vote count: 0 I can read/upload/download/delete files without issue with a System.Net.FTP FtpClient ftpClient; I won't have access to the production FTP site to enable MD5 or other hashing, so the only way I can think to validate my file uploads are comparing file sizes. Not 100% accurate, but for my purposes it will be close enough (just proving that a file was uploaded at a certain time). The reason I'm coming to SO is that I can't find a lot of Q/A on trouble with System.Net.FTP ... My problem is that in my application, whether I ftpClient.KeepSocketAlive = false; //or ftpClient.Discoect(); ftpClient.Coect(); //or Thread.Sleep( /* A While */ ); //or ftpClient.Dispose(); ftpClient = new Ft...

ادامه مطلب