Search Results

Search found 2601 results on 105 pages for 'condition'.

Page 73/105 | < Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >

  • Control ( UIButton, UILable) Hides when the Video plays Again on iPhone!

    - by Taimur Hamza
    Hi, I have displayed UIButton on top of Playing Movie using this code. NSArray *windows = [[UIApplication sharedApplication] windows]; if ([windows count] 1) { // Locate the movie player window UIWindow *moviePlayerWindow = [[UIApplication sharedApplication] keyWindow]; // Add our overlay view to the movie player's subviews so it is // displayed above it. [moviePlayerWindow addSubview:self.myABC]; } There are 2 buttons on top of my movie layer. They play different videos.Now the strange part is the video plays fine with buttons showing on top of it. When i press the button to play the other movie plays but the buttons doesnt show. Seems the view reloads and flushes all the Subviews. But i have checked it in the debug mode and it enters into the 'if' condition and this line runs [moviePlayerWindow addSubview:self.myABC]; But the buttons are not dislpayed. Any ideas wats going wrong ? Thanks, Taimur

    Read the article

  • How to identify deadlock conditions in a third-party application?

    - by Imhotep is Invisible
    I am using a third-party application to handle batch CD audio extraction via multiple FireWire attached devices, but the application frequently (though non-deterministically) hangs during the extraction. I suspect that the multithreaded application is deadlocking over some shared resource. The developer, however, suspects the problem lies elsewhere but is not addressing the problem at this time. I would like to be able to do some legwork on my end to a) prove the condition exists and b) ideally point him in the right direction. The problems: while I used to be a programmer, it's been awhile and I need to shake off the dust (last work I did was back in '99 and it was under Solaris, while the application runs under XP). Rather than there being a dearth of information online, there's almost too much to digest. Are there any suggested guides or tutorials that might help me get back up to speed sufficient enough to help identify and/or diagnose the deadlock, or are there tools or approaches that I should study up on to aid me in my task? Many thanks for all suggestions!

    Read the article

  • How do I get MSBuild Task to generate XML Documents when building a solution?

    - by toba303
    I have a solution with lots of projects. Each project is configured to generate the XML documentation file when building in Debug-Mode (which is default). That works when I build in Visual Studio 2008. In my build script on my integration server I advise MSBuild to build the whole solution, but it won't generate the documentation files. What can I do? I already tried to explicitly give the Debug-Condition to the build process, but it makes no difference. <Target Name="BuilSolution"> <MSBuild Projects="C:\Path\To\MySolution.sln" targets="Build" Properties="SolutionConfigurationPlatforms='Debug|Any CPU'"/> </Target> There seem to be some ideas to solve this problem when building single projects, but I can't afford to do this, so I need a hint for doing it this way. Thanks in advance!

    Read the article

  • Error messages in ASP.NET with jQuery UI

    - by eugeneK
    I've been using my own Error reporting module which was combination of simple c# and jQueryUI Dialog. Problem is that once error or success occurs i do write it's value to session. It does work pretty good on pages with Responce.Redirect on error but not on pages where i catch an error and then return to same form. My question is why does session which added pre-postback fails to load in pages where i have return statement on some condition. And if there another way to save errors and success message except in session ? Maybe global variables or something like that ...

    Read the article

  • How To Alter This Code So That It Only Redirects If There Is No Mouse Movement

    - by user1426261
    I have the following java script which redirects the user to another website (google in this case). <script type="text/JavaScript"> window.setTimeout("location=('http://www.google.com');",5000); </script> However, although i want the website to redirect to another website, i dont want it to redirect for no reason. My aim is for the website to redirect automatically on the condition that the cursor hasnt been moved for a little while. is this possible?

    Read the article

  • Need to create regular expression in Javascript to check the valid conditional string

    - by user1796078
    I want to create the regular expression in javascript which will check the valid conditional string like -1 OR (1 AND 2) AND 1 -1 OR (1 AND 2) -1 OR 2 -1 OR 1 OR 1 -1 AND 1 AND 1 The string should not contain 'AND' and 'OR'. For example - 1 OR 2 AND 3 is invalid. -It should be (1 OR 2) AND 3 or 1 or (2 AND 3). I tried the following Regex. It works for most of the conditions but it is failing to check the above condition. /^(\s*\(\d+\s(AND|OR)\s\d+\)|\s*\d+)((\s*(AND|OR)\s*)(\(\d+\s(AND|OR)\s\d+\)|\s*\d+))*$/ Can anyone please help me to sort out the above problem.

    Read the article

  • jquery beginner: change background on click

    - by user1873217
    I'm trying to change the background of an element on click based on the current color. Here's the relevant html: <div id="rect" style="height: 100px; width:300px; background: red"> </div> and my jquery attempt: $("#rect").click(function() { if ($(this).css('background') == 'red') { $(this).css('background','blue');} else {$(this).css('background','yellow');} }); I'm always getting a yellow box; the 'true' condition never fires. What am I doing wrong?

    Read the article

  • Getting records from a table based on a filter field and Between but also having the OR login for mu

    - by Pentium10
    I have a this table, where I store multiple ids and an age range (def1,def2) CREATE TABLE "template_requirements" ("_id" INTEGER NOT NULL, "templateid" INTEGER, "def1" VARCHAR(255), "def2" VARCHAR(255), PRIMARY KEY("_id")) Having values such as: templateid | def1 | def2 100 | 7 | 25 200 | 40 | 90 300 | 7 | 25 300 | 40 | 60 as you see for templateid 300 we have an or logic: age between 7 and 25 or age between 40 and 60. I want to get all the template ids that are not for a certain age like 25... What's the problem? If I run a query like this one: SELECT group_concat(templateid) FROM template_requirements where and '25' not between cast(def1 as integer) and cast(def2 as integer) it returns 200, 300, which is wrong, as the 300 matched on row 40 to 60, but shouldn't be included in the result as we have a condition with same templateid 7 to 25 that fails the not beetween stuff. How would be the correct query in SQLite, I would like to keep the group_concat stuff.

    Read the article

  • Help Please, I want use LINQ to Query Count in a matrix according to a array!

    - by Bob Feng
    I have a matrix, IEnumerable<IEnumerable<int>> matrix, for example: { {10,23,16,20,2,4}, {22,13,1,33,21,11 }, {7,19,31,12,6,22}, ... } and another array: int[] arr={ 10, 23, 16, 20} I want to filter the matrix on the condition that I group all rows of the matrix which contain the same number of elements from arr. That is to say the first row in the matrix {10,23,16,20,2,4} has 4 numbers from arr, this array should be grouped with the rest of the rows with 4 numbers from arr. better to use linq, thank you very much!

    Read the article

  • just x86 assembly question~~!!

    - by kevin
    this is my assembly program which is just a function to swap *x *y. so first argument from main is address of x which is in 8(%ebp) and second one is address of y is in 12(%ebp). the program does swap x and y. I need 7 lines for doing this. can you make it 6 lines and there is a condition you can use only %eax,%ecx, and %edx 3 registers. I think about it so much.. but.. I can't make it 6 lines...there must be a way.. isn't it? this might be not a big deal.. but if there is a way to get it in 6lines. I want to know.. if you know the way~ help me~ plz~ thank you and have a good and nice day~ movl 8(%ebp), %eax movl (%eax), %ecx movl 12(%ebp), %edx movl (%edx), %eax movl %ecx, (%edx) movl 8(%ebp), %ecx movl %eax, (%ecx)

    Read the article

  • Want to avoid the particular rows from select join query... See description

    - by OM The Eternity
    I have a Select Left Join Query whis displays me the rows for the latest changedone(its a time) column name ("field" should not be equal) column name ("trackid" should not be equal), and column name "Operation should be "UPDATE" ", below is the query I am talking about... SELECT j1. * FROM jos_audittrail j1 LEFT OUTER JOIN jos_audittrail j2 ON ( j1.trackid != j2.trackid AND j1.field != j2.field AND j1.changedone < j2.changedone ) WHERE j1.operation = 'UPDATE' AND j2.id IS NULL Now here I don't want a row to be displayed with a two particular column's value i.e. "field's value" the value is "LastvisitDate" and "hits" Now if if append the condition in the above query that " AND j1.field != 'lastvistDate' AND j1.field != 'hits' " theni do not get any result... The table structure is jos_audittrail: id trackid operation oldvalue newvalue table_name live changedone(its a time) I hope i have given the details properly If u still find something missing I will try to provide it more better way... Pls help me to avoid those two rows with those to mentioned value of "field"

    Read the article

  • C++: Allocation of variables in a loop

    - by Rosarch
    Let's say I have a loop like this: vector<shared_ptr<someStruct>> vec; int i = 0; while (condition) { i++ shared_ptr<someStruct> sps(new someStruct()); WCHAR wchr[20]; memset(wchr, i, 20); sps->pwsz = wchr; vec.push_back(sps); } At the end of this loop, I see that for each sps element of the vector, sps->pwsz is the same. Is this because I'm passing a pointer to memory allocated in a loop, which is destructed after each iteration, and then refilling that same memory on the next iteration?

    Read the article

  • Whhether or not it is an elegant way in such a situation?

    - by z_axis
    There are some text files which needed to be manipulated line by line. I wrote a withFile function as below: let withFile fn handle = let rec iter_lines fh = try handle (input_line fh); iter_lines fh with _ -> close_in fh in iter_lines (open_in fn);; So i can manipulate each file as : withFile "file1.txt" (fun line -> (*...*)) withFile "file2.txt" (fun line -> (*...*)) ... But i amnot sure how to exit elehantly when i donot want to handle all lines. For example: withFile "file3.txt" (fun line -> (*when the line meets some condition, i will exit without handling other lines*) ); Any suggestion is appreciated !

    Read the article

  • MYSQL - SQL query Getting single record for the similar records and populating other columns with which has more length

    - by Bujji
    Here is my case , I have a database table with below fields name place_code email phone address details estd others and example data if you look at the above example table First three records are talking about XYZ and place code 1020 . I want create a single record for these three records based on substring(name,1,4) place_code ( I am lucky here for all the similar records satisfies this condition and unique in the table .) For the other columns which record column length has max . For example again for the above 3 records email should be [email protected] , phone should be 657890 and details should be "testdetails" This should be done for all the table . (Some has single records and some has max 10 records ) Any help on query that helps me to get the desired result ? Thank You Regards Kiran

    Read the article

  • android listview loadmore button with xml parsing

    - by user1780331
    Hi i have to developed listview with load more button using xml parsing in android application. Here i have faced some problem. my xml feed is empty means how can hide the load more button on last page. i have used below code here. public class CustomizedListView extends Activity { // All static variables private String URL = "http://dev.mmm.com/xctesting/xcart444pro/retrieve.php?page=1"; // XML node keys static final String KEY_SONG = "Order"; static final String KEY_TITLE = "orderid"; static final String KEY_DATE = "date"; static final String KEY_ARTIST = "payment_method"; int current_page = 1; ListView lv; LazyAdapter adapter; ProgressDialog pDialog; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); lv = (ListView) findViewById(R.id.list); ArrayList<HashMap<String, String>> songsList = new ArrayList<HashMap<String, String>>(); XMLParser parser = new XMLParser(); String xml = parser.getXmlFromUrl(URL); // getting XML from URL Document doc = parser.getDomElement(xml); // getting DOM element NodeList nl = doc.getElementsByTagName(KEY_SONG); // looping through all song nodes <song> for (int i = 0; i < nl.getLength(); i++) { // creating new HashMap HashMap<String, String> map = new HashMap<String, String>(); Element e = (Element) nl.item(i); // adding each child node to HashMap key => value map.put(KEY_ID, parser.getValue(e, KEY_ID)); map.put(KEY_TITLE, parser.getValue(e, KEY_TITLE)); map.put(KEY_ARTIST, parser.getValue(e, KEY_ARTIST)); songsList.add(map); } Button btnLoadMore = new Button(this); btnLoadMore.setText("Load More"); btnLoadMore.setBackgroundResource(R.drawable.lgnbttn); // Adding Load More button to lisview at bottom lv.addFooterView(btnLoadMore); // Getting adapter adapter = new LazyAdapter(this, songsList); lv.setAdapter(adapter); btnLoadMore.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View arg0) { // Starting a new async task new loadMoreListView().execute(); } }); } private class loadMoreListView extends AsyncTask<Void, Void, Void> { @Override protected void onPreExecute() { // Showing progress dialog before sending http request pDialog = new ProgressDialog( CustomizedListView.this); pDialog.setMessage("Please wait.."); //pDialog.setIndeterminateDrawable(getResources().getDrawable(R.drawable.my_progress_indeterminate)); pDialog.setIndeterminate(true); pDialog.setCancelable(false); pDialog.show(); pDialog.setContentView(R.layout.custom_dialog); } protected Void doInBackground(Void... unused) { current_page += 1; // Next page request URL = "http://dev.mmm.com/xctesting/xcart444pro/retrieve.php?page=" + current_page; ArrayList<HashMap<String, String>> songsList = new ArrayList<HashMap<String, String>>(); XMLParser parser = new XMLParser(); String xml = parser.getXmlFromUrl(URL); // getting XML from URL Document doc = parser.getDomElement(xml); // getting DOM element NodeList nl = doc.getElementsByTagName(KEY_SONG); NodeList nl = doc.getElementsByTagName(KEY_SONG); if (nl.getLength() == 0) { btnLoadMore.setVisibility(View.GONE); pDialog.dismiss(); } else // looping through all item nodes <item> for (int i = 0; i < nl.getLength(); i++) { // creating new HashMap HashMap<String, String> map = new HashMap<String, String>(); Element e = (Element) nl.item(i); // adding each child node to HashMap key => value map.put(KEY_ID, parser.getValue(e, KEY_ID)); map.put(KEY_TITLE, parser.getValue(e, KEY_TITLE)); map.put(KEY_ARTIST, parser.getValue(e, KEY_ARTIST)); songsList.add(map); } // get listview current position - used to maintain scroll position int currentPosition = lv.getFirstVisiblePosition(); // Appending new data to menuItems ArrayList adapter = new LazyAdapter( CustomizedListView.this, songsList); lv.setAdapter(adapter); lv.setSelectionFromTop(currentPosition + 1, 0); } }); return (null); } protected void onPostExecute(Void unused) { // closing progress dialog pDialog.dismiss(); } } } EDIT: Here i have to run the app means the listview is displayed on perpage 4 items.my last page having 1 item.please refer this screenshot:http://screencast.com/t/fTl4FETd In last page i have to click the load more button means have to go next activity and successfully hide the button on empty page..please refer this screenshot:http://screencast.com/t/wyG5zdp3r i have to check the condition for empty page: if (nl.getLength() == 0) { btnLoadMore.setVisibility(View.GONE); pDialog.dismiss(); } How can i write the conditon fot last page?????pleas ehelp me Here i wish to need the o/p is hide the button on last page. Please help me.how can i check the condition.give me some code programmatically.

    Read the article

  • Rails: Thread won't affect database unless joined to main Thread

    - by hatboysam
    I have a background operation I would like to occur every 20 seconds in Rails given that some condition is true. It kicked off when a certain controller route is hit, and it looks like this def startProcess argId = self.id t = Thread.new do while (Argument.isRunning(argId)) do Argument.update(argId) Argument.markVotes(argId) puts "Thread ran" sleep 20 end end end However, this code does absolutely nothing to my database unless I call "t.join" in which case my whole server is blocked for a long time (but it works). Why can't the read commit ActiveRecords without being joined to the main thread? The thread calls methods that look something like def sample model = Model.new() model.save() end but the models are not saved to the DB unless the thread is joined to the main thread. Why is this? I have been banging my head about this for hours.

    Read the article

  • Rename the table Column

    - by Harendra
    Hi all, I am trying to execute the following query. I don't have 'CrewID' column so in that case it will by pass update part of the script. but it gives error Invalid object CrewID'. Can you please tell me why it excute update part even my if condition does not matched. Is there is another way to do the same. I have the requirement where need to rename the column but before rename i have to copied data in other column and need to excute script many times. if exists (select * from syscolumns where name ='CrewID' and id in (select id from dbo.sysobjects where id = object_id(N'[dbo].[WorkPlanAssignees]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)) BEGIN update A set A.TempCrewID=B.ID from WorkPlanAssignees A inner join Crew B on A.CrewID=B.ID END

    Read the article

  • Unset array element inside a foreach loop

    - by Richard Knop
    So here is my code: <?php $arr = array(array(2 => 5), array(3 => 4), array(7 => 10)); foreach ($arr as $v) { $k = key($v); if ($k > 5) { // unset this element from $arr array } } print_r($arr); // now I would like to get the array without array(7 => 10) member As you can see, I start with an array of sinwgle key = value arrays, I loop thorugh this array and get a key of the current element (which is a single item array). I need to unset elements of the array with key higher than 5, how could I do that? I might also need to remove elements with value less than 50 or any other condition. Basically I need to be able to get a key of the current array item which is itself an array with a single item.

    Read the article

  • How to make large List & Label template?

    - by codymanix
    We want to have a form which contains lots of fields one over another. All of them are passed as parameters to the form. There are many condition formulas which determine whether one element is shown or not. Depending on how many fields are shown the result will get a different number of pages. The problem is, that the designer will only allow us to design on on single page with a fixed height. But we need more space to place fields there, because they are too many of them. Is there a way to enlarge the designer working area? Sure, a possible workaround is to choose a large paper format when in dessiger which will enlarge the working area and then reset it to A4 (Standard paper format), but even this will not be enough for us in some cases. Does nobody know an answer?

    Read the article

  • MATLAB help required function root

    - by programmeur
    Dear All, I have made an program, function bisection; x1=input('enter the first value=') x2=input('enter the second value=') %f3=[]; for x=1:20 %x=1; x3=(x1+x2)/2; while x3-x1 >= 0.001 f3(x)=x3^3 + x3^2 - 3*x3 - 3; f1(x)=x1^3 + x1^2 - 3*x1 - 3; if ((f3(x)*f1(x)) < 0) x2=x3; else x1=x3; end break end format long f3' disp('The root is found to be ='); x3 end . . . . . program calculate function of interval (x1, x2) given by user, my program compile and execute but little stupid repetition until for loop complete, i want to stop further printing loop when desired value is achieved with while condition is used.

    Read the article

  • How to know record has been updated successfully in php

    - by Lisa Ray
    $sql = "UPDATE...."; if(mysql_query($sql)) { $_SESSION['Trans']="COMMIT"; header("location:result.php"); exit; } else { $_SESSION['Trans']="FAIL"; $_SESSION['errors'] = "Error: Sorry! We are unable to update your Profile, Please contact to PNP HelpDesk."; header("location:result.php"); exit; }//end IF data is getting updated then why compiler is not coming inside IF condition.

    Read the article

  • Why activity result code is diffrent then I expected

    - by Fisher
    I have 2 activities. In child activity i have put something like that in onPause(): if (isFinishing()) { final Intent intent = new Intent(); intent.putExtra(SOME_DATA, value); setResult(RESULT_OK, intent); Log.i("test", "Result set to RESULT_OK"); } In parent activity i check resultCode when child activity is destroyed, and this is what i have noticed: If i destroy child activity by some action (in some condition i invoke finish()), then resultCode is RESULT_OK But when i destroy by pressing return key (i works only in emulator so its ESC) who kills activity, then resultCode read in parent onActivityResult method equals 0 (RESULT_CANCELD). "test" log read in each case is the same.

    Read the article

  • Increment number in string

    - by iform
    Hi, I am stumped... I am trying to get the following output until a certain condition is met. test_1.jpg test_2.jpg .. test_50.jpg The solution (if you could remotely call it that) that I have is fileCount = 0 while (os.path.exists(dstPath)): fileCount += 1 parts = os.path.splitext(dstPath) dstPath = "%s_%d%s" % (parts[0], fileCount, parts[1]) however...this produces the following output. test_1.jpg test_1_2.jpg test_1_2_3.jpg .....etc The Question: How do I get change the number in its current place (without appending numbers to the end)? Ps. I'm using this for a file renaming tool.

    Read the article

  • MVC Helper Extension issue

    - by BeCool
    Hi, I need to implement a HtmlHelper extension in my MVC project simply just to output some string but ONLY in the DEBUG mode, not in REALEASE. My first attempt would be: [Conditional("DEBUG")] public static string TestStringForDebugOnly(this HtmlHelper helper, string testString) { return testString; } But obviously that would give a compile error: "The Conditional attribute is not valid because its return type is not void." So my understanding is once you set [Condition] attribute, it doesnt allow to return anything? why? What is other way to implement this kind of function? anyone help would be much appreciated. Thanks!

    Read the article

  • How to only allow users to a page through a rewrite?

    - by Pietu1998
    I have a website where I am using SSI to include some stuff to the front page. However, I'd like to show users an URL that ends with .html. I have accomplished that via a .htaccess and mod_rewrite redirect. RewriteRule ^index\.html$ index.shtml [PT,L] Also, I am using another redirect pointing to this URL to internally load the pages' content with JavaScript (example.html to index.html#example.html) with a condition for not redirecting index.html. Now, I'd like to make the .shtml page 403 Forbidden. This is also easy: RewriteRule ^index\.shtml - [F] But, now index.html also gets forbidden. I have tried adding L to the .html-to-.shtml rule, but this doesn't help. How could this problem be solved?

    Read the article

< Previous Page | 69 70 71 72 73 74 75 76 77 78 79 80  | Next Page >