Search Results

Search found 6376 results on 256 pages for 'launch condition'.

Page 154/256 | < Previous Page | 150 151 152 153 154 155 156 157 158 159 160 161  | Next Page >

  • NHibernate FetchMode

    - by Sandra
    Hi All, I have an object Parent which has a list of Children: class Parent {Id, Name, IList children} class Child {Id, Name} I need to select all parents where there is a condition for their children but I do not want to get duplicate rows (don't want the children details to appear in select list) Here is the code: session.CreateCriteria(typeof(Parent)) .SetFetchMode("children", FetchMode.Select); .CreateCriteria("children").Add(Subqueries.PropertyIn("Id", {1,2,3,4})) .List(); The query adds all proprties of child class to select list which results in duplicate Parents. Is there any way I can select all parents without having the child details in the select list? Thanks

    Read the article

  • using partials in view helpers

    - by takeshin
    Creating custom Zend View helpers I often end up with something like: // logic here if ($condition) { $output = <<<EOS... } else { $output = <<<EOS... } or using switch. Then to eliminate this, I create setPartial(), getPartial() and htmlize() for using external .phtml's. This is not the best solution, because partials do not support doctype changing. Is there any better solution, than creating abstract class handling this common case? Are there any ready Zend solutions for this case? Separate view helper for each case? And where to put common code?

    Read the article

  • Allowing AsyncTask to Manipulate Values in Different Activity Classes

    - by Matt
    Hi guys, This title may seem strange, so let me try to explain what I'm trying to do. I have several activity classes, each representing a different view in my application. My initial activity class gets loaded when the application launches. The user enters values and eventually a TCP socket is opened, and I then use AsyncTask to listen for and respond to messages from the server. I'd like for this AsyncTask class to essentially listen until the app is closed/error condition reached, and be able to update values in other activity classes after they are started. Does this make sense (it's been a long, frustrating night)? I know that static activity class references are bad practice, and touching the UI thread from other activities is bad as well, but I'm having trouble finding a clean solution to this problem. Maybe using AsyncTask is not the best approach here? Should I be using a service instead or something else entirely? Thanks in advance.

    Read the article

  • Hidden bootloader

    - by Jack
    I need a bootloader that will work as described: I want my computer to boot Windows, that is my main OS installed on a primary bootable partition. However, I'd like to have a 2-3 second span with blinking cursor, before Windows starts. If I press any key in that period it should launch Ubuntu from a small Truecrypt-encoded partition, upon providing a correct password. In other words I'm looking for a hidden bootloader that would expose itself only when a key is pressed during a certain time. Do you happen to know anything like that?

    Read the article

  • How to Compare and fetch date in Cakephp ?

    - by delete me
    I am trying to make an availability calender and need to know how can I compare date when fetching it. My DB is id start_date end_date status Now suppose I want to fetch booking in next month, i.e. from 2010-03-01 to 2010-04-01. How should I fetch this data ? I did try comparing directly using an and condition but it didnt help. The format in DB is yyyy-mm-dd and I used the same to compare. But direct comparison does not work.

    Read the article

  • How to install pgAdmin

    - by Kifsif
    I use Ubuntu 12.04 64 bit. At first I installed pgAdmin through Software Center. But it seemed old. So, I decided to uninstal it. Then I downloaded graphic installer for PostgresQL. sudo ./postgresql-9.2.1-1-linux-x64.run I was warned that a previous version of pgAdmin is found, it will be upgraded but I'll have to restart the server. Well, installation process worked. Then I turned out in terminal again. I restarted the server /etc/init.d$ sudo ./postgresql-9.2 restart /opt/PostgreSQL/9.2/pgAdmin3/bin$ ./pgadmin3 The answer is: The program 'pgadmin3' is currently not installed. So, I can't find my pgAdmin to launch it. Could you suggest me anything?

    Read the article

  • A web application that uses someone else's mail server?

    - by John
    I'm building a web application, call it http://mywebapp.com, where a user should be able to create a newsletter and email it to everyone in his user account's contact list. So he can check mark all his friends, select an html template, fill in the body content, and send. The only catch to this is that after the user sends the email, the recipient must NOT be allowed to trace the source of the email back to http://mywebapp.com. The reason for this condition is because the user is a "reseller" of my business who wants to appear as if he's an independent business. If liability issues arise due to the reseller's unduly usage, I do not want to be caught up in the legal issues. Hence, I do not want anything about my business or technology to be traceable back to me by newsletter recipients. What's the best way to achieve this?

    Read the article

  • NGINX - Two different rails apps under same domain

    - by Murkin
    I have two different Rails (passenger) apps that I wan to host on one server: somehost.com/ <-- App #1 somehost.com/admin <--- App #2 Tried playing with the 'location' directive, but failed to have both operate. Can someone suggest the correct approach ? (I would prefer both to share same environment, only launch from different directories) EDIT: Sample (desired) config Trying to do something like: server { listen 80; server_name myhost.com; rails_env production; passenger_enabled on; location / { root /opt/main_site/public/; } location /dev { root /opt/admin_site/public/; } }

    Read the article

  • In PHP + MySQL, How do I join many tables with conditions

    - by Moe
    Hi, I'm trying to get the users full activity throughout the website. I need to Join many tables throughout the database, with that condition that it is one user. What I currently have written is: SELECT * FROM comments AS c JOIN rphotos AS r ON c.userID = r.userID AND c.userID = '$defineUserID'; But What it is returning is everything about the user, but it repeats rows. For instance, for one user he has 6 photos and 5 comments So I expect the join to return 11 rows. Instead it returns 30 results like so: PhotoID = 1; CommentID = 1; PhotoID = 1; CommentID = 2; PhotoID = 1; CommentID = 3; and so on... What am i doing wrong?

    Read the article

  • How to apply a force which should not be continuos

    - by sohan
    I have a body which I move with the help of a button,here is what Im doing -(void) step: (ccTime) delta { int steps = 2; CGFloat dt = delta/(CGFloat)steps; for(int i=0; iactiveShapes, &eachShape, nil); cpSpaceHashEach(space-staticShapes, &eachShape, nil); if(MoveBody) { cpFloat movementPadding = 0.1; cpBodyApplyForce(body, cpvmult(ccp( 10, 0), movementPadding), cpvzero); } else cpBodyResetForces(body); } I just want to stop the body moving whenever the condition fails,I am trying to reset all forces to 0 with cpBodyResetForces(body),but this never work,it just keep on moving. can anyone help me how can I stop the body moving?

    Read the article

  • I'm trying to setup Xvfb to run an GUI app on a remote server with no display

    - by jz87
    I have a 3rd party java app that I need to run on a remote server. Unfortunately, the app is designed for the desktop and assumes a GUI is available. The thing is I would like to leave this app running on the remote server without having to tie up my desktop machine with a persistent VNC connection to the remote machine. I'm trying to setup Xvfb on the remote machine so emulate a graphical environment, connect to the remote machine via VNC to launch the app and configure parameters and then log off and let it run. Here's what I have so far: I have ubuntu 11.04 server apt-get install xvfb apt-get install fluxbox apt-get install x11vnc Xvfb :1 -screen 0 1024x768x16 & fluxbox & At this point I run into a problem because it gives a very undescriptive error: Cannot connect to server. How do I know if the server is running and that it's running properly?

    Read the article

  • Can a Perl subroutine return data but keep processing?

    - by Perl QuestionAsker
    Is there any way to have a subroutine send data back while still processing? For instance (this example used simply to illustrate) - a subroutine reads a file. While it is reading through the file, if some condition is met, then "return" that line and keep processing. I know there are those that will answer - why would you want to do that? and why don't you just ...?, but I really would like to know if this is possible. Thank you so much in advance.

    Read the article

  • why Observable snapshot observer vector

    - by han14466
    In Observable's notifyObservers method, why does the coder use arrLocal = obs.toArray();? Why does not coder iterate vector directly? Thanks public void notifyObservers(Object arg) { Object[] arrLocal; synchronized (this) { /* We don't want the Observer doing callbacks into * arbitrary code while holding its own Monitor. * The code where we extract each Observable from * the Vector and store the state of the Observer * needs synchronization, but notifying observers * does not (should not). The worst result of any * potential race-condition here is that: * 1) a newly-added Observer will miss a * notification in progress * 2) a recently unregistered Observer will be * wrongly notified when it doesn't care */ if (!changed) return; arrLocal = obs.toArray(); clearChanged(); } for (int i = arrLocal.length-1; i>=0; i--) ((Observer)arrLocal[i]).update(this, arg); }

    Read the article

  • Why is volatile not considered useful in multithreaded C or C++ programming?

    - by Michael E
    As demonstrated in this answer I recently posted, I seem to be confused about the utility (or lack thereof) of volatile in multi-threaded programming contexts. My understanding is this: any time a variable may be changed outside the flow of control of a piece of code accessing it, that variable should be declared to be volatile. Signal handlers, I/O registers, and variables modified by another thread all constitute such situations. So, if you have a global int foo, and foo is read by one thread and set atomically by another thread (probably using an appropriate machine instruction), the reading thread sees this situation in the same way it sees a variable tweaked by a signal handler or modified by an external hardware condition and thus foo should be declared volatile (or, for multithreaded situations, accessed with memory-fenced load, which is probably a better a solution). How and where am I wrong?

    Read the article

  • Odd behavior of permissions and icons

    - by Urban
    After some virus had infected my Windows 7, I did a complete format and re-installed the OS. I was just installing applications and copying back some data when I noticed some shortcuts changing their icons to something I couldnt recognize (Yellow icons in the image below). Also, a few exe files which previously did not ask for User permission, are now asking for it. Wondering if this is an icon cache problem, I cleared the cache by deleting the IconCache.db in AppData/Local but the problem still persists. Although I did a full system scan with MS Security Essentials, I'm not sure if this is another virus or some other problem. I would appreciate any suggestions you might have. Edit: Now even Firefox needs permissions to launch. It's icon hasnt changed, but it's got the 'shield' overlay on it like the other yellow icons.

    Read the article

  • Make sure base method gets called in C#

    - by Fnatte
    Can I somehow force a derived class to always call the overridden methods base? public class BaseClass { public virtual void Update() { if(condition) { throw new Exception("..."); // Prevent derived method to be called } } } And then in a derived class : public override void Update() { base.Update(); // Forced call // Do any work } I've searched and found a suggestion to use a non-virtual Update() but also a protected virtual UpdateEx(). It just doesn't feel very neat, isn't there any better way? I hope you get the question and I am sorry for any bad English.

    Read the article

  • jquery: Toggle elements based on result from a function

    - by Svish
    I have a number of table rows that I would like to toggle the visibility of. They should be visible if a data item I have set on them earlier equals a selected value in a form. This is what I have so far: $('#category-selector').change(function(event) { var category_id = $(this).val(); if(!category_id) { $('tr', '#table tbody').show(); } else { $('tr', '#table tbody').toggle(); } }); Of course this just toggles them on and off. Thing is that I thought I was able to give toggle a function that would decide if each row should be on or off, but it turns out I can only give it a boolean condition which would be an all or nothing deal kind of... So, I have this function: function() { return $(this).data('category_id') == category_id; } How can I use that to go through all the rows and toggle them on or off? Or is there a better approach to this? What should I do?

    Read the article

  • how to pass in a reference to a string in javascript?

    - by ijjo
    maybe a closure is my solution? not exactly sure how to pull it off though. the code is set up like so: var globalVar = ''; var globalVar2 = ''; function func() { if (condition) func2(globalVar) else func2(globalVar2) } in func2() i cache some HTML in a main container into the appropriate global variable that i pass to it. basically i have a main container that holds different pages depending on what tab they choose. for performance i want to cache the page into global vars so i need to know what tab is active to figure out which global var to assign the html to.

    Read the article

  • Java Synchronized Write Block

    - by ikurtz
    im new to java and i have a question regarding Synchronized. i have the following code for writing to network (simple implementation for now): public void networkSendData(byte[] data){ try { out.write(data); out.flush(); } catch (IOException e) { } } i was wondering if there is a need for block level Synchronized here as im am writing the whole data at once. or is there a chance for race condition? i ask because the data to write is coming for multiple sources. thank you.

    Read the article

  • Tools for viewing logs of unlimited size

    - by jkff
    It's no secret that application logs can go well beyond the limits of naive log viewers, and the desired viewer functionality (say, filtering the log based on a condition, or highlighting particular message types, or splitting it into sublogs based on a field value, or merging several logs based on a time axis, or bookmarking etc.) is beyond the abilities of large-file text viewers. I wonder: Whether decent specialized applications exist (I haven't found any) What functionality might one expect from such an application? (I'm asking because my student is writing such an application, and the functionality above has already been implemented to a certain extent of usability)

    Read the article

  • using trickle to slow down browser

    - by tester
    according to trickle's man page, http://linux.die.net/man/1/trickle i can limit the download speed of a process, e.g. trickle -u 10 -d 20 ncftp to Launch ncftp(1) limiting its upload capacity to 10 KB/s, and download capacity at 20 KB/s. how would I go about limiting google-chrome or firefox with trickle? Edit: For those of you asking why I asked such an obvious question, I tried trickle -u 10 -d 20 firefox and I'm getting an error trickle: Could not reach trickled, working independently: No such file or directory firefox opens right after, but is definitely not rate limited...

    Read the article

  • join codition in sqlserver

    - by Pallavi
    after applying join condition on two tables i want records which is maximum among records of left table my query SELECT a1.*, t.*, ( a1.trnratefrom - t.trnratefrom )AS minrate, ( a1.trnrateto - t.trnrateto ) AS maxrate FROM (SELECT a.srno, trndate, b.trnsrno, Upper(Rtrim(Ltrim(b.trnstate))) AS trnstate, Upper(Rtrim(Ltrim(b.trnarea))) AS trnarea, Upper(Rtrim(Ltrim(b.trnquality))) AS trnquality, Upper(Rtrim(Ltrim(b.trnlength))) AS trnlength, Upper(Rtrim(Ltrim(b.trnunit))) AS trnunit, b.trnratefrom, b.trnrateto, a.remark, entdate FROM mstprodrates a INNER JOIN trnprodrates b ON a.srno = b.srno)a1 INNER JOIN (SELECT c.srno, trndate, d.trnsrno, Upper(Rtrim(Ltrim(d.trnstate))) AS trnstate, Upper(Rtrim(Ltrim(d.trnarea))) AS trnarea, Upper(Rtrim(Ltrim(d.trnquality))) AS trnquality, Upper(Rtrim(Ltrim(d.trnlength))) AS trnlength, Upper(Rtrim(Ltrim(d.trnunit))) AS trnunit, d.trnratefrom, d.trnrateto, c.remark, entdate FROM mstprodrates c INNER JOIN trnprodrates d ON c.srno = d.srno) AS t ON a1.trnstate = t.trnstate AND a1.trnquality = t.trnquality AND a1.trnunit = t.trnunit AND a1.trnlength = t.trnlength AND a1.trnarea = t.trnarea AND a1.remark = t.remark WHERE t.srno = (SELECT MAX(srno) FROM a1 WHERE srno < a1.srno)

    Read the article

  • How to undo SQL changes using installer

    - by Sunil Agarwal
    I have installer to install procedures, scripts, views, etc in SQL server 2005/2008. Now I want to add a condition in the installer like if there is any error while installing, I want to undo all the changes done in SQL server. I tried to store the procedures, views, etc which I am changing while installing and reverting them back if I get any error. But am not able to do it the way I want. Can someone guide me if he had done the same thing? To specify I am using WIX installer. Also if someone has tried SMO, it will be of great help.

    Read the article

  • Run Photoshop on VM (virtual machine) to increase calculation power, without violating the licence agreement (EULA)

    - by mecplusultra
    A question concerning the possibility to run Photoshop as VM without violating the licence agreement (EULA) : My Adobe Photoshop is bloody slow, nd sometimes I need to launch thousands of image calculations that have to use hundreds of PSD templates. I want to increase my Photoshop calculation power by creating non-persistent virtual machines on my hosted server. Each VMm would only alive for a few seconds, just enough time to deliver the calculated file. Is this a violation of the EULA? I must clarify that I'm the only one to access my non persistent VMs.

    Read the article

  • java.lang.OutOfMemoryError: unable to create new native thread for multiple threads

    - by Kaustubh Ranjan Singh
    static class solver implements Runnable { static calculator(problem){ //Some code if(condition) {solver s = new solver(newproblem); new Thread(s).start();} } Public solver(int newproblem) { this.problem = newproblem ; } public void run() { // TODO Auto-generated method stub calculator(promblem); } } i am having a big array maze of 100x100 and i am trying to solve it and i am getting an error java.lang.OutOfMemoryError: unable to create new native thread(after running a code for some times). How can solve this , How can i use ExecutorService i think that will solve the problem or i want something like thisIf Number of generated threads4K then stop the first 100 threads

    Read the article

< Previous Page | 150 151 152 153 154 155 156 157 158 159 160 161  | Next Page >