Search Results

Search found 1046 results on 42 pages for 'forth'.

Page 18/42 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • [Java] Form data transition into entity beans to persist them by the server side ORM

    - by cscsaba242
    Hello guys, Is there any good explanation or tutorial which describes the common way how can we create entity beans from the received data of the form ? The main reason of my question the treating the received ids (e.g id of country,city and so forth) which is the way from the id to entity ? Example: ................Client side form username:String countryid:Integer (could be a drop down) ................Server side entities public class UserBean { String username; CountryBean Country; } public class CountryBean { String cityname; Integer id; } ............................................ Maybe the question is dependent of the used technology, but I guess there is a very common way. I would like to comprehend the conventional approach of this problem. (For the sake of the completeness I would like to save the form data (received by Stripes) by JPA) Thanks advance. cscsaba242

    Read the article

  • Source code of books made with TeX/LaTeX to learn

    - by Diego Sevilla
    Some time ago, reading this entry I found a nice image and a pointer to a better book entitled "Thinking Forth". To my surprise, the LaTeX sources of the book were ready to download, with pearls like: %% There's no bold typewriter in Computer Modern. %% Emulate with printing several times, slightly moving \newdimen\poormove \poormove0.0666pt \newcommand{\poorbf}[1]{% \llap{\hbox to \poormove{#1\hss}}% \raise\poormove\rlap{#1\hss}% \lower\poormove\rlap{#1\hss}% \rlap{\hbox to \poormove{\hss}\hbox{#1}}% #1} %\let\poorbf=\textbf \renewcommand{\poorbf}[1]{{\fontencoding{OT1}\fontfamily{cmtt}\fontseries{b}\selectfont#1}} in which it can simulate the bold stroking of a font that doesn't have it. Since reading that, I was unaware of \llap and such, but now I can use them to define boxes, etc. So, my question is twofold: Do you know of sites that show that relatively advanced use of TeX/LaTeX in terms of useful recipes, and Do you know any books that offer their TeX/LaTeX source to inspect and learn (and that are worth doing so.)?

    Read the article

  • Transparent proxying - how to pass socket to local server without modification?

    - by Luca Farber
    Hello, I have a program that listens on port 443 and then redirects to either an SSH or HTTPS local server depending on the detected protocol. The program does this by connecting to the local server and proxying all data back and forth through its own process. However, this causes the originating host on the local servers to be logged as localhost. Is there any way to pass the socket directly to the local server process (rather than just making a new TCP connection) so that the parameters of sockaddr_in (or sockaddr_in6) will be retained? Platform for this is Linux.

    Read the article

  • Convert doc/docx to semantic HTML

    - by sandstrom
    I would like to convert doc/docx documents to semantic HTML. Some wishes/requirements: Semantic HTML such that headers in the document are <h1>, <h2> etc., tables are <table> and so forth. Should preferably be possible to handle headings, lists, tables and images. Graphs and math formulas is a nice extra. • Doesn't have to be converted straight from doc/docx to html, could use an intermediary format, such as xml or docbook. • Should work programatically, and with large number of documents. The closest thing to a solution I've found so far is http://holloway.co.nz/docvert/index.html, but unfortunately there are many a few bugs, small user base and it can't handle a lot of documents. More of a proof of concept.

    Read the article

  • can I override/redefine "global" Javascript functions, like confirm() and alert()?

    - by EndangeringSpecies
    I want to do some browser automation, and those pesky confirm/alert boxes are a real pain. Disabling javascript completely in this case is not an option, unfortunately. Well, so I was wondering, can I just change the definition of those methods as seen by my browser's javascript interpreter to basically do nothing and return true? Note that I do know about redefining them in the Javascript code directly, e.g. putting in function alert(message) { return true; } but AFAIK this is not a viable approach for this situation because when doing browser automation I have to work with other people's Javascript. Moreover, my program actually begins manipulating these websites already after the page has fully loaded into the browser, so I cannot just first automatically rewrite the javascript and then load the page. Well, so I was wondering if I could instead just "permanently" modify the way alert/confirm are implemented and executed in my browser. Sort of like the equivalent of dll injection and so forth in the realm of windows apps.

    Read the article

  • How can I block based on URL (from address bar) in a safari extension

    - by PerilousApricot
    I'm trying to write an extension that will block access to (configurable) list of URLs if they are accessed more than N times per hour. From what I understand, I need to have a start script pass a "should I load this" message to a global HTML page (who can access the settings object to get the list of URLs), who will give a thumbs up/thumbs down message back to the start script to deny/allow loading. That works out fine for me, but when I use the usual beforeLoad/canLoad handlers, I get messages for all the sub-items that need to be loaded (images/etc..), which screws up the #accesses/hour limit I'm trying to make. Is there a way to synchronously pass messages back and forth between the two sandboxes so I can tell the global HTML page, "this is the URL in the window bar and the timestamp for when this request came in", so I can limit duplicate requests? Thanks!

    Read the article

  • [ebp + 6] instead of +8 in a JIT compiler

    - by David Titarenco
    I'm implementing a simplistic JIT compiler in a VM I'm writing for fun (mostly to learn more about language design) and I'm getting some weird behavior, maybe someone can tell me why. First I define a JIT "prototype" both for C and C++: #ifdef __cplusplus typedef void* (*_JIT_METHOD) (...); #else typedef (*_JIT_METHOD) (); #endif I have a compile() function that will compile stuff into ASM and stick it somewhere in memory: void* compile (void* something) { // grab some memory unsigned char* buffer = (unsigned char*) malloc (1024); // xor eax, eax // inc eax // inc eax // inc eax // ret -> eax should be 3 /* WORKS! buffer[0] = 0x67; buffer[1] = 0x31; buffer[2] = 0xC0; buffer[3] = 0x67; buffer[4] = 0x40; buffer[5] = 0x67; buffer[6] = 0x40; buffer[7] = 0x67; buffer[8] = 0x40; buffer[9] = 0xC3; */ // xor eax, eax // mov eax, 9 // ret 4 -> eax should be 9 /* WORKS! buffer[0] = 0x67; buffer[1] = 0x31; buffer[2] = 0xC0; buffer[3] = 0x67; buffer[4] = 0xB8; buffer[5] = 0x09; buffer[6] = 0x00; buffer[7] = 0x00; buffer[8] = 0x00; buffer[9] = 0xC3; */ // push ebp // mov ebp, esp // mov eax, [ebp + 6] ; wtf? shouldn't this be [ebp + 8]!? // mov esp, ebp // pop ebp // ret -> eax should be the first value sent to the function /* WORKS! */ buffer[0] = 0x66; buffer[1] = 0x55; buffer[2] = 0x66; buffer[3] = 0x89; buffer[4] = 0xE5; buffer[5] = 0x66; buffer[6] = 0x66; buffer[7] = 0x8B; buffer[8] = 0x45; buffer[9] = 0x06; buffer[10] = 0x66; buffer[11] = 0x89; buffer[12] = 0xEC; buffer[13] = 0x66; buffer[14] = 0x5D; buffer[15] = 0xC3; // mov eax, 5 // add eax, ecx // ret -> eax should be 50 /* WORKS! buffer[0] = 0x67; buffer[1] = 0xB8; buffer[2] = 0x05; buffer[3] = 0x00; buffer[4] = 0x00; buffer[5] = 0x00; buffer[6] = 0x66; buffer[7] = 0x01; buffer[8] = 0xC8; buffer[9] = 0xC3; */ return buffer; } And finally I have the main chunk of the program: void main (int argc, char **args) { DWORD oldProtect = (DWORD) NULL; int i = 667, j = 1, k = 5, l = 0; // generate some arbitrary function _JIT_METHOD someFunc = (_JIT_METHOD) compile(NULL); // windows only #if defined _WIN64 || defined _WIN32 // set memory permissions and flush CPU code cache VirtualProtect(someFunc,1024,PAGE_EXECUTE_READWRITE, &oldProtect); FlushInstructionCache(GetCurrentProcess(), someFunc, 1024); #endif // this asm just for some debugging/testing purposes __asm mov ecx, i // run compiled function (from wherever *someFunc is pointing to) l = (int)someFunc(i, k); // did it work? printf("result: %d", l); free (someFunc); _getch(); } As you can see, the compile() function has a couple of tests I ran to make sure I get expected results, and pretty much everything works but I have a question... On most tutorials or documentation resources, to get the first value of a function passed (in the case of ints) you do [ebp+8], the second [ebp+12] and so forth. For some reason, I have to do [ebp+6] then [ebp+10] and so forth. Could anyone tell me why?

    Read the article

  • Two separate fields need to be grouped in one group

    - by Sigita
    I have two fields: Mother's employer and Father's employer, and I need to group on the employer. Could somebody help me combine the two above fields into one group? Both fields are in one table. FOr example a child named John Lewis is a record in a table and he has a father and a mother and Mother's employer is IBM and Father's employer is ISF. And so forth. I need to come up with a list By employer where it would show: Employer: IBM John Lewis Emplyer: ISF John Lewis Employer: .... Thank you, Sigita

    Read the article

  • Cross-Page communication in firefox extension

    - by OzBarry
    I have two tabs that my extension uses and I wanted to pass events back and forth between them. I've already developed a Google Chrome extension that does this via the background page api, but there doesn't seem to be an equivalent in firefox. I thought message-manager in the firefox extension docs would do the trick, but the documentation on the object is quite poor. I'd be just as happy with using one of the tabs to control the other if I can't directly import the ideas of a background page from google chrome api. Any help/guidance would be great.

    Read the article

  • Make SQL Server 2005 accessible via Internet

    - by Gary Joynes
    I have an application that runs on a client's server built on a SQL Server 2005 database. We have now developed an ASP.NET v2 application which connects to this database. This web application will be hosted on an ISP's server but needs to access the SQL Server database on the client's server. The client's server has a firewall and so forth so I assume it should be possible to make the SQL Server accessible via the Internet but of course I am woriied about security. Can someone point me to some best practices to achieve this.

    Read the article

  • Double linking array in Python

    - by cdecker
    Since I'm pretty new this question'll certainly sound stupid but I have no idea about how to approach this. I'm trying take a list of nodes and for each of the nodes I want to create an array of predecessors and successors in the ordered array of all nodes. Currently my code looks like this: nodes = self.peers.keys() nodes.sort() peers = {} numPeers = len(nodes) for i in nodes: peers[i] = [self.coordinator] for i in range(0,len(nodes)): peers[nodes[i%numPeers]].append(nodes[(i+1)%numPeers]) peers[nodes[(i+1)%numPeers]].append(nodes[i%numPeers]) # peers[nodes[i%numPeers]].append(nodes[(i+4)%numPeers]) # peers[nodes[(i+4)%numPeers]].append(nodes[i%numPeers]) The last two lines should later be used to create a skip graph, but that's not really important. The problem is that it doesn't really work reliably, sometimes a predecessor or a successor is skipped, and instead the next one is used, and so forth. Is this correct at all or is there a better way to do this? Basically I need to get the array indices with certain offsets from each other. Any ideas?

    Read the article

  • Connecting two Windows XP with MSMQ

    - by NealWalters
    This question is a cross between a developer and a server setup question. I asked on Serverfault but no answer yet. As a developer, I need to setup a test to see how MSMQ works between two machines, and I'm unclear what to do. I will use C# or BizTalk to do the read/write to/from the queues. I have MSMQ installed on two Windows XP computers. Can I configure them to pass messages back and forth, or do I need an MSMQ server in the middle? If I need an MSMQ server, does the normal MSMQ with Win2003 able to act as that? And then, how do I connect my Windows XP to that Windows 2003 server? Is it a) On screen admin dialog in the MSMQ plug-in to MMC, b) a config file, c) Active Directory, d) something else? Thanks, Neal Walters

    Read the article

  • Microsoft Sync Framework - Local DB and Remote DB have to have the same schema?

    - by Josh
    When using MSF, is it implied in the technology that the sync tables are supposed to be 1-1? The reason I'm wondering is that if I'm synching from a SQL2005 database to a SQLCE, I might want the CE one to be a little more flattened out so I can get data out with a simpler SELECT statement (as CE does not support sprocs). For example, I might have a tblCustomer, tblOrder, and tblCustomerOrder in the central database, but in the local databases one table with all the data might be preferred. Of course I'd still want the updates to reflect back and forth between the two databases. Does MSF make this possible, or does the local DB have to have the same tables as the central?

    Read the article

  • Removing views from UIScrollView

    - by mohan
    I have two UIScrollViews that I move images between. The user can drag and forth between the scroll views. I am trying to animate the movement of the image from one scroll view to another. In -touchesMoved (handled in my UIViewController which has two custom UIScrollViews that intercept touch and sends to my UIViewController), I am trying to set the "center" of my UIImageView that is being moved. As it is moved, the image gets hidden behind the UIScrollView and not visible. How do I make it appear on top of the UIScrollView? I am able to handle the -touchesEnded properly by animating in the destination scroll view. I am also confused about -convertPoint:fromView: usage in the iPhone Programming Guide (See Chapter 3, Event Handling). If the touch coordinates are in window coordinates, to change my view (UIImageView inside a UIScrollView which is inside a UIView and inside a window) center don't I have to use -convertPoint:toView:, i.e., imageView.center = [self.view.window convertPoint:currentTouchPosition toView:imageView]; What am I missing?

    Read the article

  • Inserting Newline from XML to Database

    - by blackmage
    I am trying to parse this xml document in which a newline is required for certain fields and must be inserted into the database with the newline. But I've been running into problems. 1)First Problem: \n Character The first problem I had was using the \n like below. <javascript>jquery_ui.js\nshadowbox_modal.js\nuser_profile.js\ntablesorter.js</javascript> The problem was in the database the field came out ot be jquery_ui.js\nshadowbox_modal.js\n... and when output into html it was jquery_ui.jsnshadowbox_modal.jsn............... 2) Then I tried actually having newlines in the xml <javascript>jquery_ui.js shadowbox_modal.js user_profile.js tablesorter.js</javascript> The problem was the output become %20%20%20%20%20%20%20%20%20%20shadowbox_modal.js, and so forth. So how can I get a newline to hold from xml when entered into a database and then output with the newline still?

    Read the article

  • iPhone UINavigation Controller issue?

    - by NextRev
    I have 3 different xib's. I am able to go back and forth between view 1 and view 2 with the following code... This Code brings up the second view... -(IBAction)startButtonClicked:(id)sender{ self.gamePlayViewController = [[GamePlayViewController alloc] initWithNibName:@"GamePlayViewController" bundle:nil]; [self.navigationController pushViewController:gamePlayViewController animated:YES]; [GamePlayViewController release]; } This Code is executed in the second view and brings me back to the first view... -(IBAction)backButtonClicked{ [self.navigationController popViewControllerAnimated:YES]; } Now when I try to execute this code (in the second view) to get to the third view...I get SIGABRT and the app crashes...why does it work for the first view bringing up the second view, but not for the second view bringing up the 3rd view? -(IBAction)nextView{ self.thirdViewController = [[ThirdViewController alloc] initWithNibName:@"ThirdViewController" bundle:nil]; [self.navigationController pushViewController:thirdViewController animated:YES]; [thirdViewController release]; }

    Read the article

  • Using Unix Process Controll Methods in Ruby

    - by John F. Miller
    Ryan Tomayko touched off quite a fire storm with this post about using Unix process control commands. We should be doing more of this. A lot more of this. I'm talking about fork(2), execve(2), pipe(2), socketpair(2), select(2), kill(2), sigaction(2), and so on and so forth. These are our friends. They want so badly just to help us. I have a bit of code (a delayed_job clone for DataMapper that I think would fit right in with this, but I'm not clear on how to take advantage of the listed commands. Any Ideas on how to improve this code? def start say "*** Starting job worker #{@name}" t = Thread.new do loop do delay = Update.work_off(self) break if $exit sleep delay break if $exit end clear_locks end trap('TERM') { terminate_with t } trap('INT') { terminate_with t } trap('USR1') do say "Wakeup Signal Caught" t.run end end

    Read the article

  • How does the workflow between testers doing testing and coders doing the coding for pending testing

    - by dotnetdev
    In a large company that does software development, they often have dedicated teams for build management, testing, development, and so forth. Agile or not, how does this workflow amongst teams work? I mean would the test team write unit tests and then the dev team write code to adhere to these tests (basically TDD)? And then the test team may write tests for a completely different project or have a slight quiet period until the dev team have done their coding. What possible workflows are there? This is something that interests me greatly. I know that in my current company we are doing it incorrectly (we have 1 tester about 5 devs, which is small scale) but I am not sure how exactly to draw out the ideal workflow. Many (ok, an ex-Project Manager) have tried, but all failed.

    Read the article

  • If Possible, How Can One Set Either a Background Color on Cells within a Sizer or Gridlines for the

    - by MetaHyperBolic
    I am flailing about with wxWidgets, in particular, the wx.Sizer in wxPython. I have read the documents, I have a copy of wXPython in Action before me, and have set aside the problem to work on other things a better mental model of sizers hopefully gestated within my skull. None of this has worked. I am not grokking, or even getting to the point where I can bang about usefully, how sizers work. In HTML, I could at least set a background color on some div or td, or call forth borders so I could see how things are laid out. Here, I have a grey expanse and no idea which of the nested static box sizers from which it originates. I am giving static box sizers after making a mess out of the grid bag sizers. Either alternative would let me at least get a handle on how these work.

    Read the article

  • REST doesn't work with Sever-Client-Client setup

    - by drozzy
    I am having a problem with my current RESTful api design. What I have is a REST api which is consumed by Django web-server, which renders the HTML templates. REST api > Django webserver > HTML The problem I am encountering is that I have to reconstruct all the URLS like mysite.com/main/cities/<id>/streets/ into equivalent rest api urls on my web-server layer: api.com/cities/<id>/streets/ Thus I have a lot of mapping back and forth, but as far as I know REST says that the client (in this case my web-server) should NOT need to know how to re-construct the urls. Can REST be used for such a setup and how? Or is it only viable for Server-Client architecture. Thanks

    Read the article

  • Where to start when programming process synchronization algorithms like clone/fork, semaphores

    - by David
    I am writing a program that simulates process synchronization. I am trying to implement the fork and semaphore techniques in C++, but am having trouble starting off. Do I just create a process and send it to fork from the very beginning? Is the program just going to be one infinite loop that goes back and forth between parent/child processes? And how do you create the idea of 'shared memory' in C++, explicit memory address or just some global variable? I just need to get the overall structure/idea of the flow of the program. Any references would be appreciated.

    Read the article

  • How do i use RVM w/ Hudson CI server on Debian?

    - by JoshReedSchramm
    I'm trying to setup an automated "build" server for my rails projects using Hudson CI. SO far it's able to run specs and do metrics on the code but I have 2 different projects dependent on 2 different versions of ruby. So i'm trying to use RVM to run multiple copies of ruby then switch back and forth in a pre-build step. I found a couple posts like this one that try and explain how to make this work, but I'm not running a startup script for hudson, it starts on boot which is how it worked out of the box when i installed it via the debian instructions. The problem seems to be that even though hudson runs under the "hudson" account and that account has rvm installed (and working) when it tries to run a shell based prebuild step to call rvm switch 1.8.7 it fails with the error "rvm: command not found" Not sure what I'm doing wrong. Hudson is using SH as its shell but i also tried using bash. no luck. Has anyone gotten this working before in this setup?

    Read the article

  • Does anyone know a better alternative to MS Excel's Solver?

    - by tundal45
    My company has to crunch a lot of data and part of the process involves running the solver and plotting a graph through resulting data points. Obviously there is a lot of copy and paste involved and the whole process is shaky, error prone and all round cluster-fudge. I was wondering if there was an alternative to the solver that can be used so that even if we have to use excel to plot the final graph, there will be a lot less data that needs to be copied and pasted back and forth. It would be great especially if the tool could be easily integrated into a .NET application but I am open to suggestions that may require a little bit of code-fu to get this to work. Thanks!

    Read the article

  • What process does professional website building follow?

    - by Sivvy
    I've searched for a while, but I can't find anything related on Google or here. Me and some friends were debating starting a company, so I figure it might be good to do a quick pilot project to see how well we can work together. We have a designer who can do HTML, CSS and Flash, enjoys doing art, but doesn't like to do HTML and CSS... And 2 programmers that are willing to do anything. My question is, from an experienced site builder's perspective, what steps do we do - in chronological order - to properly handle a website? Does the designer design the look and feel of the site, then the programmers fill in the gaps with functionality? Or do the programmers create a "mock-up" of the site with most of the functionality, then the designer spices it up? Or is it more of a back-and-forth process? I just want to know how a professional normally handles it.

    Read the article

  • How do I do a grouping by year?

    - by kibyegn
    I have a books model with a date type column named publish_date. On my views I'm iterating through the books and I want to group the books by year such that I have a heading for every year and books that were published on that year to be listed below the year heading. So by starting with "2010" all books published on 2010 would be listed, then another heading "2009" with all books published in 2009 listed below it and so forth. <% @all_books.each do |book| %> <%=link_to book.title + ", (PDF, " + get_file_size(book.size) + ")" %> <% end %> By doing a book.publish_date.strftime("%Y") I am able to get the year but I do not know how to group the entries by year. Any help on this would be appreciated.

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >