Posts

java - delete record by any column value hibernate -

I am new to hibernate, I am learning to be struts2 + hibernate and understand from the example on the net. In one of the examples what I can see and do, remove the user from their ID, as we can see here, each user in the list has a remove link and the session . Delete () deletes the record by id, now I want the user to enter a name in the text field given there and delete it by that name. So far I've tried this type of ActionMethod: delete public string () {// HttpServletRequest request = (HttpServletRequest) ActionContext .getContext () .get (Serial Action Context.httpiequost); // UsdiododelUser (long.parlong (request.getParameter ("id")); UserDAO.delUser (user.getName ()); Return success; } DAOImpl: @ Override Public Zero Dealuser (string username) {try user user = (user) session .get (User.class, userName); Session.delete (user); } Hold (exception e) {transaction.rollback (); E.printStackTrace (); }} I hope there is a way that hibernation can rem...

installer - How to notify Python from an Inno Setup that the environment path has changed? -

So I am trying to create an installer who has the following steps: Check if the Python is installed Copy my app files Check if the Python installation directory has a Windows Environmental Path Check whether the Python script is in the folder Windows Environment Path If the script folders are not in env path, add it Install easy_install Run a python script that uses easy_install to install several libraries The problem has to be faced in the last few steps. Here's the relevant code for these setups that I am currently using: Starting the case: ssInstall's curst: // file transfer is starting to start // note: abort Use (); To finish installation during this step. End; SsPostInstall: // Start the file transfer has ended // Make sure that the Python path is in. SPythonInstallDir: = _PythonGetInstallDir (); _PathAddToSystem (sPythonInstallDir) _PathAddToSystem (sPythonInstallDir + 'Scripts;') // Play bundle Python script ExtractTemporaryFile (...

database - MySQL or NoSQL? Recommended way of dealing with large amount of data -

Image
I have a database that uses a large number of users to store random long strings (up to 100 characters) Will go The table columns will be: userid, string and actual long string. Then it will look great like this: will be unique to the user and string for each user will be unique. The app is similar to the ordinary todo-list app, so the average amount of each user will be 50 seconds. I'm using straddles so that the user can delete specific tasks at any time. I think the Toodo app can end up with 7 million works in 3 years and scares me with MySQL. So my question is that if this is the recommended way to deal with large amounts of data with a long string (every new task gets a new line)? And Is MySQL the right database solution to choose for this type of projects? I have not yet received large amounts of data and I am trying to save myself to remove the future. This is a very simple relational use case. I do not see the need for NOSQL here. The table you...

javascript - How to put items into grouped arrays where grouped by a particular key -

I am very new to the object in JS, so I'll need some help. I have the following array: var person = [{fname: 'steven', lname: 'Jameson', age: 20}, {fname: 'George', lname: 'thrump' , Age: 40}, {fname: 'Peter', lname: 'Jacobs', age: 60}, {fname: 'Peter', lname: 'thrump', age: 20}, {fname: 'steven', lname : 'Henderson', age: 40}, {fname: 'John', lname: 'yakub', age: 30}, {fname: 'steven', lname: 'thrump', age: 50}, {fname: George ', Lname:' Peterson ', age: 40}, {fname:' Peter ', lname:' Jameson ', age: 60}]; I need to sort the information from a property I have tried with the function (array, 'property') in my case this The function will be (individuals, 'fname') . I have to get an object with the key of different names and to store that key with everyone about that name. For example: object {Steven: First name ...

gwt - Create DIV in java -

How do I create a DIV program in Java so that it represents the DIV that looks like this: & lt; Div class = "fb-like-box" data-href = "http://www.facebook.com/platform" data-width = "595" data-show-face = "true" data -stream = "true" Data-header = "true" & gt; & Lt; / Div & gt; For some reason, I need to do this in Java rather than an ERA-UI template; The reason is that it appears that when it changes in pages it is removed Anyway, should I use divElement or do something else? The idea is that I should be able to create it on Java code and put it in a simple panel ... Use the HTML widget: html html = new HTML ("

javascript - Load own script on client's site -

I'm trying to create some kind of API in JavaScript. Basically, I want the client to include a script on my script and this script would load jquery, colorbox and execute a custom function, for now, will display a color box popup with a message. Of course, the script that the customer puts on their page will be hosted by me. What does this script look like for all of the above? something like var p = document.createElement ('script '); Po.type = 'text / javascript'; Po.async = true; Po.src = 'Link to your script here'; Var s = document.getElementsByTagName ('script') [0]; S.parentNode.insertBefore (POS, S); to

javascript - Dojo: how to delete/destroy a node from NodeList for real -

Here I have a list of nodes and an identification node that wants to remove from the list (both in visual and memory )). var currentRow = dojo.query (this) .parents ("div"). First () [0]; Var ParentDive = Dojo.Kuri (present day). Parentes ("Divi"). First () [0]; Var rowList = dojo.query (parentDiv). children (); The problem is, dojo.destroy (currentRow); Remove from viewing only currentRow , but when I can do the rowList loop, firebug I still remove the original size of any original size without seeing the shape of the line, so it starts to remain in memory, so how can we remove a node from the node list and return the node list? Deleting a node does not manipulate the rowList array, it The DOM only removes the node from the tree, which means that you have the rowList array in the currentRow node cached (and currentRow in the variable). DOM nodes are javascript objects, when you delete them from the DOM tree, they become garbage c...