Search Results

Search found 57 results on 3 pages for 'maddy shik'.

Page 2/3 | < Previous Page | 1 2 3  | Next Page >

  • Code snippets in interview

    - by Maddy
    Hi All, Recently I went to an interview for a C development position. Instead of asking me questions, they just gave me 20 code snippets to find out two logical errors on each one. I just couldn't complete all of the 20 since it took me time to go through each of these code snippets. My question is: Is this the right way to judge a candidate? If yes, how can I improve over my error detection skills so that I don't need to waste a lot of time in the next interview? If possible, please, suggest me some links where I could find lots of samples of such questions (mainly in C). Thanks and regards, Maddy

    Read the article

  • Another C question

    - by maddy
    Hi all, I have a piece of code shown below #include <stdio.h> #include <stdlib.h> void Advance_String(char [2],int ); int Atoi_val; int Count22; int Is_Milestone(char [2],int P2); char String[2] = "00"; main() { while(1) { if(Is_Milestone(S,21==1) { if(atoi(S)==22) { Count_22 = Count_22 + 1; } } Atoi_val = atoi(S); Advance_String(S,Atoi_val); } } int Is_Milestone(char P1[2],int P2) { int BoolInit; char *Ptr = P1; int value = atoi(Ptr); BoolInit = (value > P2); return BoolInit; } void Advance_String(char P1[2],int Value) { if(Value!=7) { P1[1] = P1[1]+1; } else { P1[1] = '0'; P1[0] = P1[0]+1 ; } } Now my problem is Count22 never increments as the char increments never achieves the value 21 or above.Could anyone please tell me the reason for this unexpected behaviour?My question here is to find the value of Count22.Is there any problem with the code? Thanks and regards Maddy

    Read the article

  • Problem in loading Iframe in FireFox!

    - by maddy
    Hello all, I'm trying to load an aspx page using Iframe in VB.net. I'm trying to set the source of Iframe with the help of Ext (JavaScript). My aspx code: <div id="container"> < iframe id="pane" name="pane" src="Empty.aspx" frameborder="0" > </iframe> </div> My Javascript code: Pane = function() { var pane; return { init: function() { if (!document.body) { return; } pane = Ext.get('pane'); if ( something ) { this.load(); } else { this.navigateTo('Page.aspx?id=' + a.ID); } }, load: function() { pane.dom.src = 'HTTPURL'; }, navigateTo: function(url) { var agt = navigator.userAgent.toLowerCase(); if (agt.indexOf("firefox") != -1) { document.getElementById('pane').src = url; } else { pane.dom.src = url; } } }; } (); This works fine with IE and Iframe gets loaded with page.aspx every time the parent page is requested. But with FireFox it doesn't. With FireFox the src attribute remains "Empty.aspx" when the page is loaded but when I refresh the page i.e. in post back event the src attribute changes to "page.aspx?id=a.id" and iframe gets loaded properly. Has anyone faced such kind of problem before? If you know the solution please help me, it's killing me big. Thanks in advance. Maddy.

    Read the article

  • Problem in loading Iframe in FireFox!

    - by maddy
    Hello all, I'm trying to load an aspx page using Iframe in VB.net. I'm trying to do it(setting the source of Iframe) with the help of Ext(JavaScript). aspx code: < div id="container" > < iframe id="pane" name="pane" src="Empty.aspx" frameborder="0" >< /iframe> < /div > Javascript code: Pane = function() { var pane; return { init: function() { if (!document.body) { return; } pane = Ext.get('pane'); if ( something ) { this.load(); } else { this.navigateTo('Page.aspx?id=' + a.ID); } }, load: function() { pane.dom.src = 'HTTPURL'; }, navigateTo: function(url) { var agt = navigator.userAgent.toLowerCase(); if (agt.indexOf("firefox") != -1) { document.getElementById('pane').src = url; } else { pane.dom.src = url; } } }; } (); This works fine with IE and Ifrma gets loaded wuth page.aspx every time the parent page is requested. But with FireFox it doesn't. With FireFox the src attribute remains "Empty.aspx" when the page is loaded but when i refresh the page i.e. in post back event the scr attribute changes to "page.aspx?id=a.id" and iframe gets loaded properly. Has anyone faced such kind of problem before? and knows the solution please help me, it's killing me big. Thanks in Advance. Maddy.

    Read the article

  • Problem in loading Ifrmae in FireFox!

    - by maddy
    Hello all, I'm trying to load an aspx page using Iframe in VB.net. I'm trying to do it(setting the source of Iframe) with the help of Ext(JavaScript). aspx code: < div id="container" > < iframe id="pane" name="pane" src="Empty.aspx" frameborder="0" >< /iframe> < /div > Javascript code: Pane = function() { var pane; return { init: function() { if (!document.body) { return; } pane = Ext.get('pane'); if ( something ) { this.load(); } else { this.navigateTo('Page.aspx?id=' + a.ID); } }, load: function() { pane.dom.src = 'HTTPURL'; }, navigateTo: function(url) { var agt = navigator.userAgent.toLowerCase(); if (agt.indexOf("firefox") != -1) { document.getElementById('pane').src = url; } else { pane.dom.src = url; } } }; } (); This works fine with IE and Ifrma gets loaded wuth page.aspx every time the parent page is requested. But with FireFox it doesn't. With FireFox the src attribute remains "Empty.aspx" when the page is loaded but when i refresh the page i.e. in post back event the scr attribute changes to "page.aspx?id=a.id" and iframe gets loaded properly. Has anyone faced such kind of problem before? and knows the solution please help me, it's killing me big. Thanks in Advance. Maddy.

    Read the article

  • How to deploy ASP.NET application with MS SQL server database

    - by Maddy
    I want to deploy my website with MS SQL server database. It's my first time and I have never done it before. What I have come to know from my googling is that I must have a domain(.com/.net/.co) and a host(for my web pages .aspx & .cs(confusion here if I can also deploy my database)). Now, I am not getting to where I have to deploy my database. If I also have to buy a seperate SQL Server database or a host consisting of every thing (means I can deploy both my ASP.NET application & database as well).

    Read the article

  • xml intellisense with Eclipse Europa?

    - by Maddy.Shik
    Please suggest some free tools or some in build feature in Eclipse for intellisense of xml. I am using Eclipse Europa which is for EE java developers. <?xml version ="1.0" encoding = "UTF-8"?> <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://jtestcase.sourceforge.net/dtd/jtestcase2.xsd"> </tests> Xml code above is part of xml file i am working upon. I am expecting eclipse to suggest me tags based upon xsd specified above. I am using ctrl+space for suggestion of new tag. Please suggest if i am using wrong key for intellisense or am i missing some tool or plugin. Thanks

    Read the article

  • Model of hql query firing at back end by hql engine?

    - by Maddy.Shik
    I want to understand how hibernate execute hql query internally or in other models how hql query engine works. Please suggest some good links for same? One of reason for reading is following problem. Class Branch { //lazy loaded @joincolumn(name="company_id") Company company; } Since company is heavy object so it is lazy loaded. now i have hql query "from Branch as branch where branch.Company.id=:companyId" my concern is that if for firing above query, hql engine has to retrieve company object then its a performance hit and i would prefer to add one more property in Branch class i.e. companyId. So in this case hql query would be "from Branch as branch where branch.companyId=:companyId" If hql engine first generate sql from hql followed by firing of sql query itself, then there should be no performance issue. Please let me know if problem is not understandable.

    Read the article

  • Gitweb showing opposite colors for added and removed text

    - by Maddy
    Hi, I have installed gitweb in our servers. And it started showing the branches and the commit diffs. But the syntax highlighting is opposite particularly for added and removed text. Supposed added text should be in green and removed text should be red. But I am seeing an opposite one. I can hack gitweb.css to get my job done. But felt like knowing why such issue is happening? And what might be the proper fix. (if any one knows good themes for gitweb? please mention)

    Read the article

  • how to know email address of sender

    - by maddy
    hi, how to know email-Id of sender using MFmailComposerView controller.My requirement is to get all email-Id's who are sending mails using my application. i tried by adding Bcc to my mail-Id. But it may erase by user(sender), so i will not get his/her mail-Id. So how to overcome this issue. is it possible to get email-Id's of all using our Application

    Read the article

  • how to apply the center of image view for another image view center

    - by maddy
    hi, I am developing image redraw app. i know the center of one image view which is having scaling property. i.e it can change it frame and center . that to be applied to another view center. when i apply center to newly formed Image view it giving wrong center because of the previous image view is having scaling property. so how can i get exact center to my new image view from previous imageview

    Read the article

  • iPhone: How to Maintain Original Image Size Thoughout Image Edits

    - by maddy
    hi, I am developing an iPhone app that resizes and merges images. I want to select two photos of size 1600x1200 from photo library and then merge both into a single image and save that new image back to the photo library. However, I can't get the right size for the merged image. I take two image views of frame 320x480 and set the view's image to my imported images. After manipulating the images (zooming, cropping, rotating), I then save the image to album. When I check the image size it shows 600x800. How do I get the original size of 1600*1200? I've been stuck on this problem from two weeks! Thanks in advance.

    Read the article

  • Understanding Java Wait and Notify methods

    - by Maddy
    Hello all: I have a following program: import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; public class SimpleWaitNotify implements Runnable { final static Object obj = new Object(); static boolean value = true; public synchronized void flag() { System.out.println("Before Wait"); try { obj.wait(); } catch (InterruptedException e) { System.out.println("Thread interrupted"); } System.out.println("After Being Notified"); } public synchronized void unflag() { System.out.println("Before Notify All"); obj.notifyAll(); System.out.println("After Notify All Method Call"); } public void run() { if (value) { flag(); } else { unflag(); } } public static void main(String[] args) throws InterruptedException { ExecutorService pool = Executors.newFixedThreadPool(4); SimpleWaitNotify sWait = new SimpleWaitNotify(); pool.execute(sWait); SimpleWaitNotify.value = false; SimpleWaitNotify sNotify = new SimpleWaitNotify(); pool.execute(sNotify); pool.shutdown(); } } When I wait on obj, I get the following exception Exception in thread "pool-1-thread-1" java.lang.IllegalMonitorStateException: current thread not owner for each of the two threads. But if I use SimpleWaitNotify's monitor then the program execution is suspended. In other words, I think it suspends current execution thread and in turn the executor. Any help towards understanding what's going on would be duly appreciated. This is an area1 where the theory and javadoc seem straightforward, and since there aren't many examples, conceptually left a big gap in me.

    Read the article

  • Any thoughts on A/B testing in Django based project?

    - by Maddy
    We just now started doing the A/B testing for our Django based project. Can I get some information on best practices or useful insights about this A/B testing. Ideally each new testing page will be differentiated with a single parameter(just like Gmail). mysite.com/?ui=2 should give a different page. So for every view I need to write a decorator to load different templates based on the 'ui' parameter value. And I dont want to hard code any template names in decorators. So how would urls.py url pattern will be?

    Read the article

  • The use of mod operators in ada

    - by maddy
    Hi all, Can anyone please tell me the usage of the following declarations shown below.I am a beginner in ada language.I had tried the internet but that was not clear enough. type Unsigned_4 is mod 2 ** 4; for Unsigned_4'Size use 4;

    Read the article

  • How to override inner class methods if the inner class is defined as a property of the top class

    - by Maddy
    I have a code snippet like this class A(object): class b: def print_hello(self): print "Hello world" b = property(b) And I want to override the inner class b (please dont worry about the lowercase name) behaviour. Say, I want to add a new method or I want to change an existing method, like: class C(A): class b(A.b): def print_hello(self): print "Inner Class: Hello world" b = property(b) Now if I create C's object as c = C(), and call c.b I get TypeError: 'property' object is not callable error. How would I get pass this and call print_hello of the extended inner class? Disclaimer: I dont want to change the code for A class.

    Read the article

  • Want procmail to run a custom python script, everytime a new mail shows up

    - by Maddy
    I have a pretty usual requirement with procmail but I am unable to get the results somehow. I have procmailrc file with this content: :0 * ^To.*@myhost | /usr/bin/python /work/scripts/privilege_emails_forward.py Wherein my custom python script(privilege_emails_forward.py) will be scanning through the email currently received and do some operations on the mail content. But I am unable to get the script getting executed at the first shot(let alone scanning through the mail content). Is this a correct way of invoking an external program(python) as soon as new mail arrives? And how does my python program(privilege_emails_forward.py) will receive the mail as input? I mean as sys.argv or stdin????

    Read the article

  • Usage of atoi in the c language

    - by maddy
    I don't understand the results of the following C code. main() { char s[] = "AAA"; advanceString(s); } void advanceString(p[3]) { int val = atoi(p); printf("The atoi val is %d\n",val); } Here the atoi val is shown as 0. But I could not figure out the exact reason. As per my understanding, it should be the summation of decimal equivalent of each values in the array.? Please correct me if I am wrong.

    Read the article

  • Python:How to override inner class methods if the inner class is defined as a property of the top cl

    - by Maddy
    I have a code snippet like this class A(object): class b: def print_hello(self): print "Hello world" b = property(b) And I want to override the inner class 'b'(please dont worry about the lowercase name) behaviour. Say, I want to add a new method or I want to change an existing method, like: class C(A): class b(A.b): def print_hello(self): print "Inner Class: Hello world" b = property(b) Now if I create C's object as c = C(), and call c.b I get TypeError: 'property' object is not callable error. How would I get pass this and call print_hello of the extended inner class? Disclaimer: I dont want to change the code for A class.

    Read the article

  • How to track audio decibel values from UIImage Picker Controller?

    - by maddy
    hi, i am developing iphone application which included UIImagePickerController Source type is UIImagePickerControllerSourceTypeCamera. In this how i can get audio values from mice as-well as i have to show it and should have option to on- off. So please help me to overcome this issue. i searched completely from UIImagePickerController document. its not having any audio property. Thanks in advance....

    Read the article

  • Grouping data into ranges in R

    - by Maddy
    supposing i have a data frame in R that has names of students in one column and their marks in another column. these marks range from 20 to 100. > mydata id name marks gender 1 a1 56 female 2 a2 37 male i want to divide the student into groups, based on the criteria of obtained marks, so that difference between marks in each group should be more than 10. i tried to use the function table, which gives the number of students in each range from say 20-30, 30-40, but i want it to pick those students that have marks in a given range and put all their information together in a group. any help is appreciated.

    Read the article

< Previous Page | 1 2 3  | Next Page >