Vote count: 0 This is my first major project in Java for a friends' company. The company does stock taking for multiple clients and and I have a few questions about the overall architecture. I will need to have a maximum of 10 concurrent coections. I will use: PostgresSQL for my db Hibeate for ORM Server application that manages the db Client applications that coect to the the server app and send requests My questions: Is that a good way of organising the structure? From my research it seems that hibeate is single threaded; Is it a good idea then to setup a FIFO request queue (on the server app) that will take the requests from multiple threads(clients) and retu the results in order OR is th...
ادامه مطلبVote count: 0 Evening All, I am extracting data from a API which exposes records as properties of the class so an example would be For Each entry As Webservice.Names In objResponse.results string = string & "'firstname'=" & entry.firstname string = string & "'suame'=" & entry.suame next now we have about 50 entities in the webservice, and each has at least 10 "fields" my question is can I expose properties any other way ? i.e. could i For Each entry As Webservice.Names In objResponse.results for each prop in entry.properties string = string & "'" & prop.name & "'=" & entry.fields(prop.name) next next or similar, i can't seem to expose the properties above, but really looking for a way that i...
ادامه مطلبVote count: 0 I keep getting this error on my website when there seems to be a lot of users online, Only one usage of each socket address (protocol/network address/port) is normally permitted. I am using a Windows 2012 R2 Server, and ruing my server with XAMPP, any help will be great thanks! asked 1 min agoCalvin Beett Let's block ads! بخوانید...
ادامه مطلبVote count: 0 We are just begiing to use Avi in AWS and I am setting up the controller instance. As I am adding users to the controller instance I would like for users that log in to the instance via shell do so with private/public keypair authentication. I created a user and added their public key to ~/.ssh/authorized_keys , I also added a NOPASSWD entry, but it seems to still be prompting for a password. Can I log in to the GUI with a password but restrict shell access to keypair only? asked 6 mins agomattdlh Let's block ads! بخوانید...
ادامه مطلبVote count: 0 here is my code : string constr = EstablishDBCoection(); string test = "test"; string sql = "INSERT INTO XX_XML_TEST (XML) VALUES ('" + test + "')"; OracleCoection con = new OracleCoection(constr); con.Open(); OracleCommand cmd = new OracleCommand(sql, con); cmd.CommandType = CommandType.Text; cmd.ExecuteNonQuery(); However i try its giving the table doesn't exist error but i have created the table in database. please help asked 54 secs agoRajeswari ML Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Using C# and .NET 4.5: I am looking for a simple and efficient option to use the windows user and current machine to encrypt/decrypt a string. The encrypted string can be decrypted on the very same machine with the same logged-in user only. Other users logged-in to the same machine must not be able to decrypt. The same user logged into another machine must not be able to decrypt. Back in 2002, I used to use DPAPI to do the similar thing. I expect there is a more mode option in 2016 with .NET 4.5 with single line of API call :) Thank you, asked 39 secs agoAllan Xu Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am trying to take a screenshot of the whole screen and would like to send it over the network to a server. (the server will be the one to save it) I am currently using this code HBITMAP hBitmap = CreateCompatibleBitmap(hScreen, w, h); CImage image; image.Attach(hBitmap); image.Save(L"screen.jpg"); It does save the file, but that's not what I want. I'm also not sure how to get the bytes, I was thinking of GetBits() but the documentation says it is a pointer to the data of the underlying Bitmap. What I want to get is the JPG data which I can send through the network and save the image using the server. So, why am I not just using bitmap and sending it directly? because it is a ...
ادامه مطلبVote count: 0 I was searching for .NET memory leak detection tools and .NET profilers - on inteet there is plenty of them, however - they are all commercial tools. I would like to check if there is any open-source alteative, what is their development status (what is working and what is not working), and if it's possible - if someone could pinpoint me to which API's are used to "hook" .NET garbage collector. Also I've understood that reference analysis is non-trivial - if GC does not collect memory - then it means that someone references that data - so that in a tu requires some sort of reference backtracking - also interesting what API's and techniques exists to analyze references. I would p...
ادامه مطلبVote count: 0 Hello everybody and thanks in advance, I've made a class in my .cs file and then declared a list of it like this... public partial class MyClass : System.Web.UI.Page { public List PreciosYStocks = new List(); protected void Page_Load(object sender, EventArgs e) { ... ... public class PrecioStock { public string Precio; public string Stock; public PrecioStock(string Precio, string Stock) { this.Precio = Precio; this.Stock = Stock; } public void SetPrecio(string nuevoPrecio) { this.Precio = nuevoPrecio; } public void SetStock(string nuevoStock) { this.Stock = nuevoStock; } public string GetPrecio() { retu this.Precio; } public string GetStock() { retu this.Stock; } } Then, I fill...
ادامه مطلبVote count: 0 I am quite new In asp.net. Today I want to sort my drop down list. This is my controller of editing: public ActionResult Edit(int? id) { if (id == null) { retu new HttpStatusCodeResult(HttpStatusCode.BadRequest); } User user = db.Users.Find(id); if (user == null) { retu HttpNotFound(); } ViewBag.DefaultCustomerProjectId = new SelectList(db.CustomerProjects, "Id", "Name", user.DefaultCustomerProjectId); ViewBag.DefaultServiceId = new SelectList(db.Services, "Id", "Name", user.DefaultServiceId); ViewBag.CustomerId = new SelectList(db.Customers, "Id", "Name", user.CustomerId); retu View(user); } And this is my edit view @model TimeReportingLib.User @{ ViewBag.Title = "Edit"; } Edi...
ادامه مطلبVote count: 0 Im creating a memory game in vb .net its called digit span test. the game will show to random numbers and hide then it will ask what number it shows. Im a begier in VB net so i dont know how to start. asked 56 secs agoChristian Larvin Melgar Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Suppose I have a directed graph G in Network X such that: G has multiple trees in it Every node N in G has exactly 1 or 0 parent's. For a particular node N1, I want to find the root node of the tree it resides in (its ancestor that has a degree of 0). Is there an easy way to do this in network x? I looked at: Getting the root (head) of a DiGraph in networkx (Python) But there are multiple root nodes in my graph. Just only one root node that happens to be in the same tree as N1. asked 1 min agomt88 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am using MSBNX (microsoft's bbn software) and I caot figure out how it makes its calculations. This is what my network looks like. The probabilities for rain are: Yes-> 0.2 , no -> 0.8 JakesLawn wet and rain -> 0.9, not wet and rain -> 0.1, no rain and wet -> 0.2, no rain and not wet -> 0.8. TracyLawn rain and wet -> 0.9, rain and not wet -> 0.1, no rain and wet -> 0.2, no rain and not wet -> 0.8. Now if i set tracylawn to observed wet I get this: How is the the chance that it rained, 0.5294, calculated here? asked 1 min agosamuelk71 Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am trying to find out if a process is not frozen by sending a message to its handler and see if it reaches it. I caot use Process.Responding because it looks like the monitored application needs to have a window. This has to work for processes that run without a window. I use this method but it always retus FALSE: Const SMTO_BLOCK = &H1 Const SMTO_ABORTIFHUNG = &H2 Const WM_NULL = &H0 Public Function SendMessageTimeout(hWnd As HandleRef, msg As Integer, wParam As IntPtr, lParam As IntPtr, flags As Integer, timeout As Integer, ByRef pdwResult As IntPtr) As IntPtr End Function Public Function ProcessIsResponding(ByVal proc As Process) As Boolean Dim handleRef As HandleRef = New...
ادامه مطلبVote count: 0 Can you help me on how to use Jquery UI Progress bar for every postback in asp.net? I really don't know how to start I'm new to Jquery UI. I have an UpdateProgress but it doesn't work on my jquery ui dialog so I wanted to try Jquery UI Progress bar. Any suggestion will be helpful! Thank you. asked 3 mins agoKevinNEWBIE Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I'm using an INF file such as the one below to generate a CSR with "certreq.exe -new -q request.inf request.csr": [Version] Signature= "$Windows NT$" [NewRequest] Subject = "CN=subject" KeyLength = 2048 Exportable = TRUE MachineKeySet = TRUE SMIME = FALSE PrivateKeyArchive = FALSE UserProtected = FALSE UseExistingKeySet = FALSE ProviderName = "Microsoft RSA SChael Cryptographic Provider" ProviderType = 12 RequestType = CMC KeyUsage = 0 KeyAlgorithm = RSA HashAlgorithm = sha256 [EnhancedKeyUsageExtension] OID=1.3.6.1.5.5.7.3.1 Is there a way that I can do this via .NET classes, and preferably without having to export the CSR to a file once it is generated? Thanks a lot for your ...
ادامه مطلبVote count: 0 I'm trying to select/highlight certain parts of my RTB-Lines. Splitted by ":" i want to have both parts to have each their own selectioncolor. This is what my RTB-Text looks like: Key1:Value1Key2:Value2Key3:Value3Key4:Value4Key5:Value5... This is my code so far: For i As Integer = 0 To rtbxPreview.Lines.Count - 1 Dim currStartIndex As Integer = rtbxPreview.Text.IndexOf(rtbxPreview.Lines(i)) rtbxPreview.Select(currStartIndex, rtbxPreview.Text.IndexOf(":", currStartIndex) - currStartIndex) rtbxPreview.SelectionColor = Color.DeepSkyBlue Dim currLastIndex As Integer = rtbxPreview.Text.LastIndexOf(rtbxPreview.Lines(i)) rtbxPreview.Select(currLastIndex, rtbxPreview.Text.LastIndexOf("...
ادامه مطلبVote count: 0 NET 2.3.2 - Clustered Mode with ADOJobStore. It is having 8 jobs with a simple trigger for each. All the jobs are configured with [DisallowConcurrentExecution]. The issue I am facing is - After a couple of hours of run (sometimes 30 minutes) , some of the jobs go into TRIGGER_STATE ERROR (queried QRTZ_TRIGGERS tables) without logging any error information in quartz log file. Pl find the relevant sections of quartz.server.exe.config below. Also currently to isolate this issue - I am currently ruing Quartz from one server only (recreated schema). To add more information - All the jobs "Execute" method have a main try-catch to prevent any exception reach Quartz-Core. Let me know i...
ادامه مطلبVote count: 0 iOS 9.2 use NSURLCoection vastNetCoect = [[NSURLCoection alloc] initWithRequest:request delegate:self startImmediately:NO]; [vastNetCoect scheduleInRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode]; [vastNetCoect start]; if (self.delegate && [self.delegate respondsToSelector:@selector(startGetData:)]) { [self.delegate startGetData:self]; } use instrument check memory leak anyone has good idea how to solve this problem ? is it system problem ? asked 2 mins agokingnight Let's block ads! بخوانید...
ادامه مطلبVote count: 0 pic of the problem I have a problem. I'm making a simple unet game for 2 players. They should face each other and the host should be on the left and the client on the right. Round Robin only works with the host discoects and re-run. But first thing first, inside the tank's script in OnStartLocalPlayer() I make the check if the player was spawned in the left side or the right (simple transform.position.x is greater than a value or not). The host flip both to the wrong direction and the client sees the right direction but the tanks shoot from their behinds (as the host sees this). The player prefab is a red tank facing right (blue is colored also in OnStartLocalPlayer() to make o...
ادامه مطلب