Search Results

Search found 1152 results on 47 pages for 'sunny kumar aditya'.

Page 8/47 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • search engine crawling frequency

    - by Aditya Pratap Singh
    I want to design a search engine for news websites ie. download various article pages from these websites, index the pages, and answer search queries on the index. I want a short pseudocode to find an appropriate crawling frequency -- i do not want to crawl too often because the website may not have changed, and do not want to crawl too infrequently because index would then be out of date. Assume that crawling code looks as follows while(1) { sleep(sleep_interval); // sleep for sleep_interval crawl(website); // crawls the entire website diff = diff(currently_crawled_website, previously_crawled_website); // returns a % value of difference between the latest and previous crawls of the website sleep_interval = infer_sleep_interval(diff, sleep_interval); } looking for a pseudocode for the infer_sleep_interval method: long sleep_interval infer_sleep_interval(int diff_percentage,long previous_sleep_interval) { ... ... ... } i want to design method which adaptively alters the sleeping interval based on the update frequency of the website.

    Read the article

  • javascript function is not getting called onclick of hx:commant button

    - by Sunny Mate
    hi i have method called test() when iu click on the commandButton the method should get called but the method is not getting called my code is as follows method **function test() { alert('ss'); return "true"; }** and method calling is <hx:commandExButton type="submit" value="Search" styleClass="action2" id="searchButton" **onclick="return test();"** action="#{pc_WorkInProgressUserGrid.doSearchButtonAction}" immediate="true </hx:commandExButton> any suggestion would be helpful

    Read the article

  • How to add database layer in core data application

    - by aditya
    Hi all I am fairly new to core data technology and i searched a lot on how to add the database to a core data application.so can anybody guide me on how to integrate the database layer? i have seen the iphone tutorial on core data (i.e books example) but i am not able to understand how to .sqlite file has been included in that application

    Read the article

  • C# property definition

    - by Sunny
    For C# properties, I can do this: public class Employee{ public string Name { get; private set; } public Employee(string name){ Name = name; } } which means that the Name property can be set within the class Employee & can be read publicly. But, if I want to restrict the set to only within the constructors of the Employee class, I need to do: public class Employee{ public readonly string Name = String.Empty; public Employee(string name){ Name = name; } } But, for this case, I had to change the property to a field. Is there any reason this is not possible/allowed in C#: public class Employee{ public string Name { get; private readonly set; } public Employee(string name){ Name = name; } } IMO this will allow us to have properties which can be set only in the constructor & does not require us to change properties to fields... Thanks!

    Read the article

  • SwfUpload flash uploader not visible and not working in IOS

    - by Sunny
    i am working on a web application based on media gallery.In this application i am uploading media using SWFUpload either images and videos.When i try to open my application on IOS then uploader not visible there.Where it is working fine on safari installed on windows.I want some suggestions from experts of this field. one site who is using SWFUpload is http://www.ehproductions.com/mediaimage.htm. Here SwfUploader working nice on windows but not on IOS machines. Is there any javax html5 compatible uploader? Thanks in advance.

    Read the article

  • Drawing widgets (such as buttons) over QGraphicsView

    - by Aditya Bhatt
    How do I draw interactive widgets such as QButtons and Line Edits over a QGraphicsView? For ex, I have selected a region over an image in an image editing app which displays an image with QGraphicsView, and I want to annotate this region with a name. So I want to have a Line edit and two buttons (Cross and Tick) below this rectangular selection. How do I draw these? Sample code would be cool!

    Read the article

  • Is it okay to truncate a SHA256 hash to 128 bits?

    - by Sunny Hirai
    MD5 and SHA-1 hashes have weaknesses against collision attacks. SHA256 does not but it outputs 256 bits. Can I safely take the first or last 128 bits and use that as the hash? I know it will be weaker (because it has less bits) but otherwise will it work? Basically I want to use this to uniquely identify files in a file system that might one day contain a trillion files. I'm aware of the birthday problem and a 128 bit hash should yield about a 1 in a trillion chance on a trillion files that there would be two different files with the same hash. I can live with those odds. What I can't live with is if somebody could easily, deliberately, insert a new file with the same hash and the same beginning characters of the file. I believe in MD5 and SHA1 this is possible.

    Read the article

  • javascript function is not getting called onclick of hx:commandButton

    - by Sunny Mate
    When I click on the hx:commandButton the method should get called but the method is not getting called. My code is as follows: function test() { alert('ss'); return "true"; } and method calling is : <hx:commandExButton type="submit" value="Search" styleClass="action2" id="searchButton" onclick="return test();" action="#{pc_WorkInProgressUserGrid.doSearchButtonAction}" immediate="true"> </hx:commandExButton> Any suggestion would be helpful.

    Read the article

  • iphone photo maximum size

    - by aditya
    Hi all i want to know there a limitation in size for an iphone to display an image? as the resolution of iphone is 320*480 px. i am developing an app which fetches photos from an URL and that URL contains some photos os size 600KB.So when i launch the app in simulator it behaves properly but in device the application crashes as soon as photos with higher resolution are displayed , and when lower resolution photos are displayed the app does not crash in the device.

    Read the article

  • How to make groupbox invisble on select of a radiobutton

    - by Aditya
    Hi, I am doing an Windows Application using XAML ,WPF in C#. I have 2 radio buttons called "WriteData" and "ReadData". when writeData is selected, I need groupbox with a textbox and browse button inside it to be displayed at a particular location, (this i have already designed in UI..) <GroupBox Header="Browse Data" Name="grpBrowseData" Height="78" VerticalAlignment="Top" HorizontalAlignment="Left" Width="1030"> <Grid Name="grdBrowse" Height="60" Width="1030"> <Button x:Name="btnBrowseButton" Margin="0,7.5,45,20" Content="Browse" Click="BrowseButton_Click" HorizontalAlignment="Right" Width="111" /> <TextBox x:Name="txtBxBrowseTB" Margin="46,13.993,185,17.5" Text="TextBox" TextWrapping="Wrap" TextChanged="BrowseTB_TextChanged" ></TextBox> <Label HorizontalAlignment="Left" Margin="-1.25,8.75,0,15" Name="label1" Width="47.5" FontSize="13" VerticalContentAlignment="Center" HorizontalContentAlignment="Center">Path:</Label> Now, if I select "ReadData" radio button, a combo box should be visible in the SAME LOCATION where the above groupbox is displayed, the xaml code for this <GroupBox Header="Select the Project" Name="grpSelectProject" Height="78" VerticalAlignment="Top" HorizontalAlignment="Left" Width="1030" Visibility="Visible" Margin="-1030,0,0,0"> <Grid Name="grdSelectProject" Height="60" Width="1030"> <Label HorizontalAlignment="Left" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Margin="0,11.662,0,20.825" Width="95.103">Select the Project</Label> <ComboBox Margin="119.952,13.994,493.969,16.66"></ComboBox> </Grid></GroupBox> so, how do I make only one visible as per the radio button selected. In the ReadData_click event i tried to make other groupbox invisble. but I wasnt able to do that. please help me. Thanks Ramm

    Read the article

  • create dynamic link buttons in ListView

    - by Sunny
    Hi, I am creating a search using listview. when user enter a word in search, I am generating a listview with the results. Now, there will be tags in each listview row. When, user clicks the tag, again a search happens using the value in the tag. There may be any number of tags for each listview row. I have to generate linkbuttons for these tags. Could anyone please guide me on how to create dynamic linkbuttons and access those values for further search. You can have a look at delicious.com. I need a similar functionality. Thanks in advance.

    Read the article

  • keeping the header fixed in datatable while allowing its contents to scroll

    - by Sunny Mate
    I have a table with header and data. When I am scrolling the header is also getting scrolled my code is as follows: <div style="height:200px;overflow-x:auto;overflow-y:scroll;"> <h:dataTable cellpadding="0" cellspacing="0" border="0" width="60%" headerClass="HeaderCellSorted" columnClasses="DataCell" rowClasses="OddRow,EvenRow" styleClass="SearchResults" footerClass="FooterCell" id="userListTable" value="#{pc_WorkInProgressUserGrid.userGridModel.rebalanceByUserList}" var="userGridDO"> <h:column id="userNameColumn"> <f:facet name="header"> <h:outputLink id="userNameColumnLink" styleClass="Header" value="#" onclick="refreshUserGrid('DISPLAYNAME')"> <h:outputText id="userNameColID" styleClass="outputText" value="User"/> Any suggestion would be helpful.

    Read the article

  • recvfrom returns invalid argument when *from* is passed

    - by Aditya Sehgal
    I am currently writing a small UDP server program in linux. The UDP server will receive packets from two different peers and will perform different operations based on from which peer it received the packet. I am trying to determine the source from where I receive the packet. However, when select returns and recvfrom is called, it returns with an error of Invalid Argument. If I pass NULL as the second last arguments, recvfrom succeeds. I have tried declaring fromAddr as struct sockaddr_storage, struct sockaddr_in, struct sockaddr without any success. Is their something wrong with this code? Is this the correct way to determine the source of the packet? The code snippet follows. ` /*TODO : update for TCP. use recv */ if((pkInfo->rcvLen=recvfrom(psInfo->sockFd, pkInfo->buffer, MAX_PKTSZ, 0, /* (struct sockaddr*)&fromAddr,*/ NULL, &(addrLen) )) < 0) { perror("RecvFrom failed\n"); } else { /*Apply Filter */ #if 0 struct sockaddr_in* tmpAddr; tmpAddr = (struct sockaddr_in* )&fromAddr; printf("Received Msg From %s\n",inet_ntoa(tmpAddr->sin_addr)); #endif printf("Packet Received of len = %d\n",pkInfo->rcvLen); } `

    Read the article

  • PortableArea and MasterPages

    - by Sunny
    How can I design my portable areas such that the consumer can specify the MasterPage & various content placeholders & my portable area renders into those regions at run time? Any code samples and/or ideas? Thanks!

    Read the article

  • Dojo JSON call back always returns an error

    - by Sunny
    Hi Guys, I am using Dojo and making a AJAX call to a JAVA Class and trying to get the output of the program to a Alert box to the client. var showResult = function(result){ console.log("Showing Result()"); var store = new dojo.data.ItemFileReadStore({ data: result}); console.dir(store); store.fetch( { onItem: function(data) { alert("Hie"); }, onError: function(error,request){ alert("ERROR");} }); }; This is my code, showResult basically is call back function from xhr request. I can see console.dir(store) printed onto Firebug but the fetch function always returns the onError block. My store array is of the form {info="Test Message"} and I need to retrieve "Test Message" and display it in a Alert box. Any help?

    Read the article

  • Any Alternate way for writing to a file other than ofstream

    - by Aditya
    Hi All, I am performing file operations (writeToFile) which fetches the data from a xml and writes into a output file(a1.txt). I am using MS Visual C++ 2008 and in windows XP. currently i am using this method of writing to output file.. 01.ofstreamhdr OutputFile; 02./* few other stmts / 03.hdrOutputFile.open(fileName, std::ios::out); 04. 05.hdrOutputFile << "#include \"commondata.h\""<< endl ; 06.hdrOutputFile << "#include \"Commonconfig.h\"" << endl ; 07.hdrOutputFile << "#include \"commontable.h\"" << endl << endl ; 08. hdrOutputFile << "#pragma pack(push,1)" << endl ; 09.hdrOutputFile << "typedef struct \n {" << endl ; 10./ simliar hdrOutputFiles statements... */.. I have around 250 lines to write.. Is any better way to perform this task. I want to reduce this hdrOutputFile and use a buffer to do this. Please guide me how to do that action. I mean, buff = "#include \"commontable.h\"" + "typedef struct \n {" + ....... hdrOutputFile << buff. is this way possible? Thanks Ramm

    Read the article

  • Change Target of Edge in BGL

    - by Sunny
    If my BGL graph contain edge from node x to node y, and I want to change the target of this edge, so that now it's pointing from x to z, how it can be done? Are there any functions in BGL for that?

    Read the article

  • Mysql query taking too much time

    - by aditya
    I have problem related to mysql database. i am linux webserver admin and i am facing a problem with a mysql query. The database is very small. I tried to track in logs and found that a query is taking minimum 5 sec to respond . The first page of site is coming from the database. Client are using cms. when the server gets some number of hits database server starts to give response very slowly and wait time increases from 5 sec to several seconds. I checked slow query logs { Query_time: 11.480138 Lock_time: 0.003837 Rows_sent: 921 Rows_examined: 3333 SET timestamp=1346656767; SELECT `Tender`.`id`, `Tender`.`department_id`, `Tender`.`title_english`, `Tender`.`content_english`, `Tender`.`title_hindi`, `Tender`.`content_hindi`, `Tender`.`file_name`, `Tender`.`start_publish`, `Tender`.`end_publish`, `Tender`.`publish`, `Tender`.`status`, `Tender`.`createdBy`, `Tender`.`created`, `Tender`.`modifyBy`, `Tender`.`modified` FROM `mcms_tenders` AS `Tender` WHERE `Tender`.`department_id` IN ( 31, 33, 32, 30 ); } Every line in the log is same only there is diff in Query time. Is there any way tweak the performance?

    Read the article

  • CSS Ease-in-out to full screen

    - by Aditya Singh
    I have a black background div of a size which contains an image. <div id="Banner"> <img onclick="expand();" src="hola.jpg"> </div> #Banner { position:relative; height:50px; width:50px; margin:0 auto; background-color:#000000; -webkit-transition: all 0.5s ease-in-out 0.5s; -moz-transition: all 0.5s ease-in-out 0.5s; -o-transition: all 0.5s ease-in-out 0.5s; transition: all 0.5s ease-in-out 0.5s; } <script type="text/javascript"> function expand(){ document.getElementById('Banner').style['height'] = '250'; document.getElementById('Banner').style['width'] = '250'; } </script> So when the user clicks on the image, the div transitions to 250, 250. My problem is that, i want it to to transition to full screen. The following javascript function does expand to fullscreen but the transition effect doesn't come. I need to do it from a javascript code without jquery. function expand(){ document.getElementById('Banner').style['position'] = 'absolute'; document.getElementById('Banner').style['height'] = '100%'; document.getElementById('Banner').style['width'] = '100%'; document.getElementById('Banner').style['top'] = '0'; document.getElementById('Banner').style['left'] = '0'; } Please advice. Update : Solution Roger below has provided with an alternative solution. This takes care if the document has already been scrolled and is another place. Will expand the div to full browser screen. sz=getSize(); //function returns screen width and height in pixels currentWidth=200; currentHeight=200; scalex=sz.W/currentWidth; scaley=sz.H/currentHeight; transx=0-((expandingDiv.offsetLeft+(currentWidth/2))-(sz.W/2))+document.body.scrollLeft; transy=0-((expandingDiv.offsetTop+(cuttentHeight/2))-(sz.H/2))+document.body.scrollTop; transx = transx.toString(); transy = transy.toString(); document.getElementById("Banner").style['-webkit-transform'] = 'translate('+transx+'px,'+transy+'px) scale('+scalex+','+scaley+')';

    Read the article

  • hi when i write <h:outputText value="Login Name"/> tag in my jsp i am getting Cannot find FacesConte

    - by Sunny Mate
    hi when i write <h:outputText value="Login Name"/> tag in my jsp i am getting "Cannot find FacesContext" error , with out that tag my jsp working fine here is my JSP <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <body> Login Name <input type="text" value=""/><br> **<h:outputText value="Login Name"/>** Password<input type="password" value=""/><br> <input type="submit" value="Login"> </body> </html>

    Read the article

  • Can Graphical Operations be combined in Qt or any other library ?

    - by Sunny
    Hi, Here is a Scenario, A series of operations that I will call for painting, QPainter p(this); 1). p.fillRect(0,0,320,240, RED_COLOR) 2) p.drawLine(0,0,100,100, BLUE_COLOR) 3) p.fillRect(0,0,320,240, YELLOW_COLOR) Now I want that painter should not draw first FillRect Function. It should not draw line. It should only perform last operation. Is there any way to achive this optimization in Qt. Is this type of drawing/painting optimizations are supported by any library?

    Read the article

  • Showing the URL of the view in the address bar, instead of the one of the action

    - by aditya
    @RequestMapping(value = "updatePatient", method = RequestMethod.POST) public ModelAndView postUpdatePatientById( @ModelAttribute("patient") PatientForm patientForm, HttpSession session) { Long id = (Long) session.getAttribute("refId"); if (id != 0 || id != null) { Patient patient1 = HospitalPatientHelper .getPatientFrom_PatientForm(patientForm); patientService.updatePatient(patient1, id); PatientService patientService) { Patient patient = patientService.getPatientById(id); ModelAndView mv; PatientForm patientForm = HospitalPatientHelper .getPatientForm_FromPatient(patient); List<Weight> weights = patientService.viewLast10RecordedWeight(patient); WeightTable weightTable = new WeightTable(); List<WeightSummaryTable> summaryWeights = weightTable.summary(weights, patient.getHeight()); mv = new ModelAndView("patient1/patientDetail"); mv.addObject("patient", patientForm); mv.addObject("summaries", summaryWeights); mv.addObject("lastWeight", summaryWeights.get(0).getWeight()); mv.addObject("bmi", summaryWeights.get(0).getBmi()); return mv; } else { return new ModelAndView("patient1/patientDetail"); } } the page shown sucessfully, but the url dosn't change, means the url is not showing the address www.url.com/patient1/patientDetail.htm and i want that the returning view address should also be shown in the url too. please help me

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >