Search Results

Search found 238 results on 10 pages for 'sagar mk'.

Page 4/10 | < Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • SoapHttpClientProtocol disable ssl certificate validation

    - by MK
    I need to tell my C# soap web service consumer to not validate the certificate and just accept it. Is this possible? Why: we publish a https-only web service. A client needs to consume it but has some kind of firewall/proxy (WebSense?) which does something to the certificate to make it fail validation. At this point I don't even know the details of what it does, but the customer appears to be ok with forfeiting the benefits of SSL, so I'm looking for a workaround.

    Read the article

  • IE7 HTML/CSS margin-bottom bug.

    - by mk
    Here is the scenario: I have a table with a margin-bottom of 19px. Below that I have a form that contains some fieldsets. One of them is floated right. The problem is that the margin-bottom is not getting the full 19px in IE7. I've gone through all of the IE7 css/margin/float bugs that I can think of and have tried remedies but have been unsuccessful. I have been googling for a while now and cannot find anything that is helping out. Here is what I have tried. Wrapping the form or fieldset in an unstyled div. No apparent change. Nixing the margin-bottom on the table and instead wrapping that with a div and giving it a padding-bottom of 19px. No apparent change. Nixing the margin-bottom on the table and adding a div with a fixed height of 19px. No apparent change. Putting a clear between the table and the fieldset. I know there are some others that I am forgetting, but those are the things I have tried out recently. This happens to each fieldset.

    Read the article

  • MapViewOfFile shared between 32bit and 64bit processes

    - by MK
    Hi, I'm trying to use MapViewOfFile in a 64 bit process on a file that is already mapped to memory of another 32 bit process. It fails and gives me an "access denied" error. Is this a known Windows limitation or am I doing something wrong? Same code works fine with 2 32bit processes. The code sort of looks like this: hMapFile = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, szShmName); if (NULL == hMapFile) { /* failed to open - create new (this happens in the 32 bit app) */ SECURITY_ATTRIBUTES sa; sa.nLength = sizeof(SECURITY_ATTRIBUTES); sa.bInheritHandle = FALSE; /* give access to members of administrators group */ BOOL success = ConvertStringSecurityDescriptorToSecurityDescriptor( "D:(A;OICI;GA;;;BA)", SDDL_REVISION_1, &(sa.lpSecurityDescriptor), NULL); HANDLE hShmFile = CreateFile(FILE_FAXCOM_SHM, FILE_ALL_ACCESS, 0, &sa, OPEN_ALWAYS, 0, NULL); hMapFile = CreateFileMapping(hShmFile, &sa, PAGE_READWRITE, 0, SHM_SIZE, szShmName); CloseHandle(hShmFile); } // this one fails in 64 bit app pShm = MapViewOfFile(hMapFile, FILE_MAP_ALL_ACCESS, 0, 0, SHM_SIZE);

    Read the article

  • Handling messages for window from other process

    - by MK
    I'm developing a C# WPF application that reparents the main window of another application using a call to Win32 SetParent(). The handle to this out-of-process child window is wrapped by a class named FormHost which is derived from HwndHost. All is working well except for one thing: messages for the reparented window are not delivered to FormHost. MSDN documentation clearly states that the HwndHost window procedure WndProc() cannot be used with out-of-process windows. The alternative, MessageHook doesn't work either. I also tried calling AttachThreadInput() to combine the input processing of the two windows. No luck. Any suggestions?

    Read the article

  • pythonic way of selecing a random value that satisfies a certain predicate

    - by MK
    Suppose I have a list of elements and I want to randomly select an element from the list that satisfies a predicate. What is the pythonic way of doing this? I currently do a comprehension followed by a random.choice() but that is unnecessarily inefficient : intlist = [1,2,3,4,5,6,7,8,9] evenlist = [ i for i in intlist if i % 2 == 0 ] randomeven = random.choice(evenlist) Thanks!

    Read the article

  • debugging a resource leak in a printer driver

    - by MK
    I'm trying to debug a memory leak in a printer driver. I'm pretty sure it's a resource leak, not just a plain memory leak because analyzing heap with !heap -s in windbg doesn't show any increase. How do I monitor other kinds of objects with windbg? Number of GDI objects and open handles is not growing either, so what could it be?

    Read the article

  • jquery ajax call in onsubmit function is not working

    - by shilna mk
    I have form submission page add_sale.php and an ajax page ajx_check_sale.php.Ajax call is inthe onsubmit function.But ajax is not worikng.Anybody give any solution plz.. I have form submission page add_sale.php and an ajax page ajx_check_sale.php.Ajax call is inthe onsubmit function.But ajax is not worikng.Anybody give any solution plz.. add_sale.php function sale_credit(id) { var cust_name=$('#cust_name').val(); $.ajax({ type: "POST", url: 'ajx_typ1.php', data:'id='+id, success: function(msg) { $("#sale_type1").html(msg); } }); $.ajax({ type: "POST", url: 'ajx_typ3.php', data:'id='+id, success: function(msg) { $("#sale_type3").html(msg); } }); $.ajax({ type: "POST", url: 'ajx_typ2.php', data:'id='+id, success: function(msg) { $("#sale_type2").html(msg); } }); } function validate_form() { var cust_name= $('#cust_name').val(); var total= $('#total').val(); var sale_type= $('#sale_type').val(); if(sale_type=='return') { $.ajax({ type: "POST", url: 'ajx_check_sale.php', data:'cust_name='+cust_name + '&total=' + total, success: function(msg) { alert(msg); /*if(msg==0) { alert("Return is greater then sale"); return false; } */ } }); } } <form action="" method="post" name="adFrm" onSubmit="return validate_form()"> <select name="sale_type" style="width:130px;" id="sale_type" onchange="sale_credit(this.value)" > <option value="">Select</option> <option value="credit">Credit</option> <option value="payment">Payment</option> <option value="return">Return</option> </select> </form> ajx_check_sale.php require_once("codelibrary/inc/variables.php"); require_once("codelibrary/inc/functions.php"); echo $cust_name=$_POST['cust_name']; echo $return=$_POST['total']; $cus="select sum(total) as total_sum from customer where id='$cust_id'"; $cus2=mysql_query($cus); $fet=mysql_fetch_array($cus2); $total=$fet['total_sum']; if($return>$total) { $status=0; echo $status; } else { $status=1; echo $status; }

    Read the article

  • int vs size_t on 64bit

    - by MK
    Porting code from 32bit to 64bit. Lots of places with int len = strlen(pstr); These all generate warnings now because strlen() returns size_t which is 64bit and int is still 32bit. So I've been replacing them with size_t len = strlen(pstr); But I just realized that this is not safe, as size_t is unsigned and it can be treated as signed by the code (I actually ran into one case where it caused a problem, thank you, unit tests!). Blindly casting strlen return to (int) feels dirty. Or maybe it shouldn't? So the question is: is there an elegant solution for this? I probably have a thousand lines of code like that in the codebase; I can't manually check each one of them and the test coverage is currently somewhere between 0.01 and 0.001%.

    Read the article

  • render HTML (convert to bitmap)

    - by MK
    Can somebody recommend the best (and preferably portable) way to render HTML documents onto a bitmap? As far as I understand my main 2 options are WebKit and Gecko, but I wasn't able to find a good starting point on how to do it. When I last tried doing this 5 years ago, I ended up using Gecko to send the document to a printer, which is not really what I need. I need rendering to a in-memory bitmap. To clarify: server side, no Java, no .NET, batch processing, performance, not interactive, no Javascript.

    Read the article

  • SharePoint problem: opening a office 2007 document tries to open as a zip file

    - by MK
    I have a number of Office 2007 documents (.pptx, .docx, .xlsx) in a SharePoint document library and when user tries to open the documents, it tries to open as a zip file. This happens to some users, but not all. I posted this issue at http://superuser.com/questions/110211/why-office-2007-documents-open-as-a-zip-file, but I failed to mention that it was related to the Sharepoint so it got moved to the superuser.com Please help.

    Read the article

  • finding max in python as per some custom criterion

    - by MK
    Hi, I can do max(s) to find the max of a sequence. But suppose I want to compute max according to my own function , something like so - currmax = 0 def mymax(s) : for i in s : #assume arity() attribute is present currmax = i.arity() if i.arity() > currmax else currmax Is there a clean pythonic way of doing this? Thanks!

    Read the article

  • Automatically open files given as command line arguments in Python

    - by mk
    I have a lot of Perl scripts that looks something like the following. What it does is that it will automatically open any file given as a command line argument and in this case print the content of that file. If no file is given it will instead read from standard input. while ( <> ) { print $_; } Is there a way to do something similar in Python without having to explicitly open each file?

    Read the article

  • How would you implement a hashtable in language x?

    - by mk
    The point of this question is to collect a list of examples of hashtable implementations using arrays in different languages. It would also be nice if someone could throw in a pretty detailed overview of how they work, and what is happening with each example. Edit: Why not just use the built in hash functions in your specific language? Because we should know how hash tables work and be able to implement them. This may not seem like a super important topic, but knowing how one of the most used data structures works seems pretty important to me. If this is to become the wikipedia of programming, then these are some of the types of questions that I will come here for. I'm not looking for a CS book to be written here. I could go pull Intro to Algorithms off the shelf and read up on the chapter on hash tables and get that type of info. More specifically what I am looking for are code examples. Not only for me in particular, but also for others who would maybe one day be searching for similar info and stumble across this page. To be more specific: If you had to implement them, and could not use built-in functions, how would you do it? You don't need to put the code here. Put it in pastebin and just link it.

    Read the article

  • How to calculate the correct image size in out pdf using itextsharp ?

    - by MK
    I' am trying to add an image to a pdf using itextsharp, regardless of the image size it always appears to be mapped to a different greater size inside the pdf ? The image I add is 624x500 pixel (DPI:72): And here is a screen of the output pdf: And here is how I created the document: Document document = new Document(); System.IO.MemoryStream stream = new MemoryStream(); PdfWriter writer = PdfWriter.GetInstance(document, stream); document.Open(); System.Drawing.Image pngImage = System.Drawing.Image.FromFile("test.png"); Image pdfImage = Image.GetInstance(pngImage, System.Drawing.Imaging.ImageFormat.Png); document.Add(pdfImage); document.Close(); byte[] buffer = stream.GetBuffer(); FileStream fs = new FileStream("test.pdf", FileMode.Create); fs.Write(buffer, 0, buffer.Length); fs.Close(); Any idea why on how to calculate the correct size ?

    Read the article

  • java socket programming problem

    - by mk.persia
    Hi, what's wrong with my code? sorry about my bad English package sockettest; import java.io.*; import java.net.*; class sevr implements Runnable{ public void run() { ServerSocket sSkt = null; Socket skt = null; BufferedReader br = null; BufferedWriter bw = null; try{ System.out.println("Server: is about to create socket"); sSkt = new ServerSocket(6666); System.out.println("Server: socket created"); } catch(IOException e){ System.out.println("Server: socket creation failure"); } try{ System.out.println("Server: is listening"); skt = sSkt.accept(); System.out.println("Server: Connection Established"); } catch(IOException e){ System.out.println("Server: listening failed"); } try{ System.out.println("Server: creating streams"); br = new BufferedReader(new InputStreamReader(skt.getInputStream())); bw = new BufferedWriter(new OutputStreamWriter(skt.getOutputStream())); System.out.println("Server: stream done"); } catch(IOException e){ System.out.println("Server: stream failed"); } System.out.println("Server: reading the request"); try{ String line = null; while((line =br.readLine()) != null){ System.out.println("Server: client said- "+ line); } } catch(IOException e){ System.out.println("Server: reading failed"); } System.out.println("Server: reading fished"); System.out.println("Server: responding"); try{ bw.write("Hi! I am server!"); } catch(IOException e){ System.out.println("Server: responding failed"); } System.out.println("Server: responding finished"); System.out.println("Server: is finishing"); try { br.close(); bw.close(); skt.close(); sSkt.close(); } catch (IOException e) { System.out.println("Server: finishing failed"); } System.out.println("Server: done"); } } class clnt implements Runnable{ public void run() { Socket skt = null; BufferedReader br = null; BufferedWriter bw = null; try{ System.out.println("Client: about to create socket"); skt = new Socket(InetAddress.getLocalHost(),6666); System.out.println("Client: socket created"); } catch(IOException e){ System.out.println("Client: socket creation failure"); } try{ System.out.println("Client: creating streams"); br = new BufferedReader(new InputStreamReader(skt.getInputStream())); bw = new BufferedWriter(new OutputStreamWriter(skt.getOutputStream())); System.out.println("Client: stream done"); } catch(IOException e){ System.out.println("Client: stream failed"); } System.out.println("Client: requesting"); try{ bw.write("Hi! I am Client!"); } catch(IOException e){ System.out.println("Client: requesting failed"); } System.out.println("Client: requesting finished"); System.out.println("Client: reading the respond"); try{ String line = null; while((line =br.readLine()) != null){ System.out.println("Client: server said- "+ line); } } catch(IOException e){ System.out.println("Client: reading failed"); } System.out.println("Client: reading fished"); System.out.println("Clientrver: is finishing"); try { br.close(); bw.close(); skt.close(); } catch (IOException e) { System.out.println("Client: finishing failed"); } System.out.println("Client: done"); } } public class Main { public static void main(String[] args) { System.out.println("Main started"); Thread sThread = new Thread(new sevr()); Thread cThread = new Thread(new clnt()); sThread.start(); cThread.start(); try { sThread.join(); cThread.join(); } catch (InterruptedException ex) { System.out.println("joining failed"); } System.out.println("Main done"); } } output: Main started Server: is about to create socket Client: about to create socket Client: socket created Client: creating streams Server: socket created Server: is listening Server: Connection Established Server: creating streams Server: stream done Server: reading the request Client: stream done Client: requesting Client: requesting finished Client: reading the respond and it waits here forever!

    Read the article

  • How do I manage permissions on multiple items in SharePoint 2007?

    - by mk
    I'm relatively new to SharePoint and am trying to put a bunch of Word files (that were on our network file server) into SharePoint. We have set up a document library that, by default, gives everyone access to everything. This is the desired top-level permission set because most items will work well this way. The problem is that I have a bunch of documents I want to add and apply some specific permissions to. I can do this, but...please tell me there is some way I can do this for multiple documents at the same time. Attempting to do this one-by-one is a pain and I'm hoping for a better solution here. Thanks very much in advance.

    Read the article

  • how to load a module within python debugger

    - by MK
    This looks like something simple but I could not find the answer so far - I have just learnt python and need to start learning pdb. In my module I have the usual if __name__ == __main_ trick to execute some code when the module is run as a program. So far I have been running it via python -m mymod arg1 arg2 syntax Now I want to do exactly the same thing from inside pdb. Normally in C, I would just do gdb mybinary followed by run arg1 arg2 But I cannot figure out how to achieve the same thing in pdb. I am sure there has to be a simple way to achieve this but it is taking me too long to search for it.. Thanks for your help!

    Read the article

  • do not allow integrated windows authentication *for one of the domains*

    - by MK
    We have an ASP.NET web application which uses integrated windows authentication. It is accessed by users from two domains, A and B. A is the primary domain and B is an older domain which is going away. Web application is authenticating users using a group policy which only exists in domain A. Every user in domain B has an account in domain A. The application lives in domain A. There was no trust between the domains. So users from domain A would get silently authenticated and logged into the site. Users from domain B didn't get authenticated automatically and were prompted with the IE popup, to which they authenticated using their domain A credentials and everything worked. Now somebody has set up a trust between the domains and users from domain B get authenticated silently to IIS, and then their login fails (no group policy). So the question is: can I either programmatically or in IIS configuration make it so that users from domain B still get prompted even though there is trust between the domains? Is there a way to tell the server where IIS is running to ignore the trust relationship maybe?

    Read the article

  • portable way to deal with 64/32 bit time_t

    - by MK
    I have some code which is built both on Windows and Linux. Linux at this point is always 32bit but Windows is 32 and 64bit. Windows wants to have time_t be 64 bit and Linux still has it as 32 bit. I'm fine with that, except in some places time_t values are converted to strings. So when time_T is 32 bit it should be done with %d and when it is 64bit with %lld... what is the smart way to do this? Also: any ideas how I may find all places where time_t's are passed to printf-style functions to address this issue?

    Read the article

  • conditionally enabling constructor

    - by MK
    Here is how I can conditionally enable a constructor of a class : struct Foo { template<class T> Foo( T* ptr, boost::enable_if<is_arithmetic<T> >::type* = NULL ) {} }; I would like to know why I need to do the enabling via a dummy parameter. Why can I not just write : struct Foo { template<class T> Foo( boost::enable_if<is_arithmetic<T>, T>::type* = NULL ) {} };

    Read the article

  • Would this predicate work ? this came on my quiz to find the position of element X in a data structure called list

    - by M.K
    example: position(1,list(1,list(2,nil)),Z). Z = 1. position(3,list(1,list(2,list(3,nil)),Z). Z = 3. where Z is the position of element X in a data structure of a list in the above format Here was my solution: position(X,list(nil),0). %empty list position(X,list(X,T),1). %list with X as head or first element position(X,list(H,T),Z):- position(X,list(T,nil),Z1), %X is in tail of list (H,T) Z is Z1 + 1.

    Read the article

  • How do I size a second div to be 100% height underneath a fixed image?

    - by mk
    I'm using semi-transparent PNGs (due to the designer's overlapping of elements) and trying to achieve a layout that represents the design while still working well on the web. Thus I have simple HTML: <div id="right"> <div id="welcome"></div> <div id="welcomeRepeatingBottom"></div> </div> And I'm trying to use CSS as follows: #right { height: 100%; position: absolute; right: 0px; top: 0px; width: 430px; } #welcome { background-image: url("welcome.png"); height: 614px; width: 430px; position: absolute; top: 0px; left: 0px; } #welcomeRepeatingBottom { background: url("welcomeBottom.png") repeat-y; height: 100%; left: 0px; position: absolute; top: 614px; width: 430px; } The problem is...the #welcomeRepeatingBottom div can't overlap the #welcome div because of the transparency. What I really want is the #welcomeRepeatingBottom div to be height: 100% - 614px, but of course you can't do that. Am I missing something here or do I need to manipulate these values with JavaScript/JQuery?

    Read the article

  • installing windows on mac mini.

    - by sagar
    Please - please, don't start down voting after reading the question title. Hey ! Please first of read out the question. I brought a whole new mac mini as I am an iPhone developer - I prefer to use it. But most of my family members are not used to with mac osx. They don't know how to operate os x. Managing files Opening documents Browser & many many other issues. It's not their age to learn more, people like us ( computer geek ) can easily get into new systems. I had many attempted efforts to teach them for all these above topics in windows. Summary, Of all these, I know how to use mac, but they don't know. They stair like I am making private & bad usage of mac. In short, I just want to install windows. So, that they can feel that mac mini is for all members not for just me. Original Question Dual Boot windows & os x on mac mini ? Is it possible ? How ? Does it void warranties of apple ?

    Read the article

  • sudo moo commands in mac

    - by sagar
    Hey ! every one. I have gone through following link It's pretty interesting. It gives listing of some funny commands over ubuntu & Linux I am eager to know about commands like these on mac. Does any one know commands like on mac ?

    Read the article

  • Gmail & yahoo - offline mail viewer for mac osx

    - by sagar
    Hello ! Every one. My question are divided into two parts ----------------------- 1 ---------------------------- I am having a difficulty regarding receiving my mails. I have 3 gmail accounts & 1 yahoo account. In windows, I use Microsoft outlook or microsoft outlook express. But In mac is there any inbuilt software for it ? If not, is that any freely available mail client for mac osx ? ----------------------- 2 ---------------------------- One more thing, My system administrators has banned regular gmail & yahoo sites. Means I can't use gmail or yahoo site for mailing. Ok. I don't want to break my office rules - but what about my mails on gmail & yahoo, they are really very important for me. Means that - I just want to access incoming mails nothing more than that.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >