Search Results

Search found 4585 results on 184 pages for 'master subdocument'.

Page 136/184 | < Previous Page | 132 133 134 135 136 137 138 139 140 141 142 143  | Next Page >

  • Embarrassingly parallel workflow creates too many output files

    - by Hooked
    On a Linux cluster I run many (N > 10^6) independent computations. Each computation takes only a few minutes and the output is a handful of lines. When N was small I was able to store each result in a separate file to be parsed later. With large N however, I find that I am wasting storage space (for the file creation) and simple commands like ls require extra care due to internal limits of bash: -bash: /bin/ls: Argument list too long. Each computation is required to run through a qsub scheduling algorithm so I am unable to create a master program which simply aggregates the output data to a single file. The simple solution of appending to a single fails when two programs finish at the same time and interleave their output. I have no admin access to the cluster, so installing a system-wide database is not an option. How can I collate the output data from embarrassingly parallel computation before it gets unmanageable?

    Read the article

  • Improving HTML scrapper efficiency with pcntl_fork()

    - by Michael Pasqualone
    With the help from two previous questions, I now have a working HTML scrapper that feeds product information into a database. What I am now trying to do is improve efficiently by wrapping my brain around with getting my scrapper working with pcntl_fork. If I split my php5-cli script into 10 separate chunks, I improve total runtime by a large factor so I know I am not i/o or cpu bound but just limited by the linear nature of my scraping functions. Using code I've cobbled together from multiple sources, I have this working test: <?php libxml_use_internal_errors(true); ini_set('max_execution_time', 0); ini_set('max_input_time', 0); set_time_limit(0); $hrefArray = array("http://slashdot.org", "http://slashdot.org", "http://slashdot.org", "http://slashdot.org"); function doDomStuff($singleHref,$childPid) { $html = new DOMDocument(); $html->loadHtmlFile($singleHref); $xPath = new DOMXPath($html); $domQuery = '//div[@id="slogan"]/h2'; $domReturn = $xPath->query($domQuery); foreach($domReturn as $return) { $slogan = $return->nodeValue; echo "Child PID #" . $childPid . " says: " . $slogan . "\n"; } } $pids = array(); foreach ($hrefArray as $singleHref) { $pid = pcntl_fork(); if ($pid == -1) { die("Couldn't fork, error!"); } elseif ($pid > 0) { // We are the parent $pids[] = $pid; } else { // We are the child $childPid = posix_getpid(); doDomStuff($singleHref,$childPid); exit(0); } } foreach ($pids as $pid) { pcntl_waitpid($pid, $status); } // Clear the libxml buffer so it doesn't fill up libxml_clear_errors(); Which raises the following questions: 1) Given my hrefArray contains 4 urls - if the array was to contain say 1,000 product urls this code would spawn 1,000 child processes? If so, what is the best way to limit the amount of processes to say 10, and again 1,000 urls as an example split the child work load to 100 products per child (10 x 100). 2) I've learn that pcntl_fork creates a copy of the process and all variables, classes, etc. What I would like to do is replace my hrefArray variable with a DOMDocument query that builds the list of products to scrape, and then feeds them off to child processes to do the processing - so spreading the load across 10 child workers. My brain is telling I need to do something like the following (obviously this doesn't work, so don't run it): <?php libxml_use_internal_errors(true); ini_set('max_execution_time', 0); ini_set('max_input_time', 0); set_time_limit(0); $maxChildWorkers = 10; $html = new DOMDocument(); $html->loadHtmlFile('http://xxxx'); $xPath = new DOMXPath($html); $domQuery = '//div[@id=productDetail]/a'; $domReturn = $xPath->query($domQuery); $hrefsArray[] = $domReturn->getAttribute('href'); function doDomStuff($singleHref) { // Do stuff here with each product } // To figure out: Split href array into $maxChilderWorks # of workArray1, workArray2 ... workArray10. $pids = array(); foreach ($workArray(1,2,3 ... 10) as $singleHref) { $pid = pcntl_fork(); if ($pid == -1) { die("Couldn't fork, error!"); } elseif ($pid > 0) { // We are the parent $pids[] = $pid; } else { // We are the child $childPid = posix_getpid(); doDomStuff($singleHref); exit(0); } } foreach ($pids as $pid) { pcntl_waitpid($pid, $status); } // Clear the libxml buffer so it doesn't fill up libxml_clear_errors(); But what I can't figure out is how to build my hrefsArray[] in the master/parent process only and feed it off to the child process. Currently everything I've tried causes loops in the child processes. I.e. my hrefsArray gets built in the master, and in each subsequent child process. I am sure I am going about this all totally wrong, so would greatly appreciate just general nudge in the right direction.

    Read the article

  • Flexibility starting to develop applications and DB

    - by kristaps
    Hi! First of all I want to say some info for admins. This post can help to all DBA and developers. Hope You don't close this. I'm writing about widespread problem I'm writing master work and I want that You will had little time to answer my questions in my form. These questions are about db structures. Visit here: http://spreadsheets.google.com/embeddedform?formkey=dEhmOWFGb2twWVFreWJwWXp2U3c5a1E6MQ After I summarized results, I insert it in new post and developers can choose which structure to use to reach needed requirements developing new applications. I think that my test will help a lot of people. Best regards, Kristaps

    Read the article

  • How do I change a property's value based on a conditional in msbuild?

    - by Noel Kennedy
    I would like to change the value of a property if it is a certain value. In C# I would write: if(x=="NotAllowed") x="CorrectedValue; This is what I have so far, please don't laugh: <PropertyGroup> <BranchName>BranchNameNotSet</BranchName> </PropertyGroup> ///Other targets set BranchName <Target Name="CheckPropertiesHaveBeenSet"> <Error Condition="$(BranchName)==BranchNameNotSet" Text="Something has gone wrong.. branch name not entered"/> <When Condition="$(BranchName)==master"> <PropertyGroup> <BranchName>MasterBranch</BranchName> </PropertyGroup> </When> </Target>

    Read the article

  • Create Access databases programatically through vb.net

    - by user87225
    Let me preface this by saying that I know this is a stupid way to go about this, but it needs to be handled in this way. I need to make an application that from a master database creates a number of access database files (tables of a larger db), then these are manually given to users who fill in data, the database files are emailed back to a user who, through the application, combines them again. The only part of this that I am unsure about is problematically creating the access db's. I have read that through Microsoft Jet OLE DB Provider and Microsoft ADO Ext I can create them (the tables and data), but I also need forms. I have yet to start writing anything and this is away from my area of work, so any insight/links would be much appreciated. Also, I would hope to be able to write this in the free express version of visual studio. Are there components needed that would prevent me from this? Thanks.

    Read the article

  • Suggest a open source project which heavily uses java concurrency utilities?

    - by user49767
    I have done good amount of Java programming, but yet to master Threading & Concurrency. I would like to become an expert programmer in threading & concurrency. I have also took a short at Tomcat code, I was able to understand, but looking even more complex project. Could you suggest any open source project which heavily uses java threading & concurrency utilities? Note : I have also reading java.util.concurrent package source code, but eager to learn from Application perspective, than creating my own threading utilities.

    Read the article

  • Multiple RadUpload Control in One Page

    - by user159771
    I have an aspx page that uses master page. In the papx page, I load a user control containing 2 RadUpload controls (Rad1 and Rad2). User can choose to upload the file either using the first RadUpload or the second RadUpload and there is certain validation applied for each RadUpload. The weird thing happened is that when I upload file using Rad2 (second RadUpload), the RadUpload.UploadedFiles for the first RadUpload is there (count = 1). Instead of the file being uploaded by Rad2, it is detected as if it is uploaded from Rad1, so my validation failed. Does someone encounter this problem before? This is a very weird thing and I've spent almost 1 and a half day fixing this without knowing what happened to the control

    Read the article

  • Save in Sessions to reduce database load

    - by Kovu
    at the moment I try to reduce the load on my database extremly, so I had a look in my website and think about - what database calls can I try to avoid. So is there a rule for that? Sould I save every information in a Session that is nearly never changed? e.g.: The User-Table is a 35-coloumn-table which I need so often in so different ways, that in the moment I got this user-object at nearly every PageLoad AND in the master-site-page-load (Settings, display the username for a welcome message, colors etc etc.). So is that good to avoid the database query here, save the User-Object in a Session and call it from the session - and of course destroy the session whereever the User-Object get changed (e.g. User change his settings)?

    Read the article

  • Events on controls in web server control

    - by MarkyMarc
    Hi All, I'm creating a web server control that has an image button on it. The html for the control is done in the RenderControls of the code, the control devrives from WebControl, IScriptControl, INamingContainer. The button is coded as follow in the RenderControls: System.Web.UI.WebControls.ImageButton img = new System.Web.UI.WebControls.ImageButton(); img.ImageUrl = "Url of the image"; img.Click += new ImageClickEventHandler(img_Click); img.ID = this.ClientID + "_img"; img.CausesValidation = false; imgLock.RenderControl(output); The button apreas in the browser but when i click on it, the page postsback but the event handler for the button doesn't get fired, from what i can figure out, since the control goes throught RenderControls eachtime the page is posted back, the button gets redrawn and the event handling disapears. This server control is in a master page. Anyone can help me on this? Thanks

    Read the article

  • worth of getting certified

    - by user58935
    In 6 months I will be a graduate and pursuing a masters in computers for the next 2 years in India. My options after that are to either do a post graduation (again) from a reputed college abroad, or to take up a job. Recently I came to know about about global certification programs like ccna, ccnp, ccie, oca, ocp, j2se, mcse, mcp etc. If I do these certifications, will it help me get a better job, or get into a top college ? How much does it matter? Considering that I like most areas of computers, which certifications are most beneficial? (I even had a crazy idea to do them all in 2.5 years left. Or should I try and master a few instead). Please advise.

    Read the article

  • Why is always MasterName blank in OnActionExecuted?

    - by devzero
    I'm trying to get the master page changed for all my aspx pages. For some reason I'm unable to detect when this function is called for a ascx page instead. Any help in correting this would be appreciated. protected override void OnActionExecuted(ActionExecutedContext filterContext) { var action = filterContext.Result as ViewResult; if (action != null && action.MasterName != "" && Request.IsAjaxRequest()) { action.MasterName = "Ajax"; } base.OnActionExecuted(filterContext); }

    Read the article

  • Problem with updating multiple rows which are in conflict with unique index

    - by GUZ
    I am using Microsoft SQL Server and I have a master-detail scenario where I need to store the order of details. So in the Detail table I have ID, MasterID, Position and some other columns. There is also a unique index on MasterID and Position. It works OK except one case: when I have some existing details and I change their order. For example when I change a detail on position 3 with a detail on position 2. When I save the detail on position 2 (which in the database has Position equal to 3) SQL Server protests, because the index uniqueness constraint. How to solve this problem in a reasonable way? Thank you in advance Lukasz Glaz

    Read the article

  • Appropriate high level language to deal with binary data

    - by fortran
    Hi, I need to write a small tool that parses a textual input and generates some binary encoded data. I would prefer to stay away from C and the like, in favour of a higher level, (optionally) safer, more expressive and faster to develop language. My language of choice for this kind of tasks usually is Python, but for this case dealing with binary raw data can be problematic if one isn't very careful with the numbers being promoted to bignums, sign extensions and such. Ideally I would like to have records with named bitfields that are portable to be serialised in a consistent manner. (I know that there's a strong point in doing it in a language I already master, although it isn't optimal, but I think this could be a good opportunity to learn something new). Thanks.

    Read the article

  • What area of Software Engineering are you going to focus your research on?

    - by ultrajohn
    hi guys! I have this very subjective question regarding software engineering. Let's say you want to pursue a graduate degree i.e. master degree with a major in software engineering, what particular topic or area of research in the field are your going to pursue? From your experience, what are the different aspects of software engineering which are vital in our field that are "under"(less) research. I know this is very subjective, I just want to elicit ideas from you guys whom I think knows a lot about the field. Thanks a lot.

    Read the article

  • disable a form in asp.net..

    - by rohit
    hi iam working on asp.net using c# project...iam facing a problem...the problem is,i had a master page in which iam using collapse pannel(ajax control)... in collapse pannel i had folders like:- xyz abc def ghi.... and in xyz folder i had some forms.... nw the problem is that i had a search menu in my main page(comes after login)...after searching a grid view is open and in that there is a column name (suppose) XYZ...so when i click on items in that column then only i want xyz folder to be enable or viewed so that i acess forms in that folder....hw cud i do that..i search alot but didn't get the solution..plz help me go through this...

    Read the article

  • SSL: can the secret key be sniffed before the actual encryption begins?

    - by Jorre
    I was looking into SSL and some of the steps that are involved to set up an encrypted connection between a server and a client computer. I understand that a server key and certificate is sent to the browser, and that a secret code is being calculated, like they say in the following video: http://www.youtube.com/watch?v=iQsKdtjwtYI around 5:22, they talk about a master secret code that is being calculated to start talking in an encrypted way. My question now is: before the connection is actually encrypted (the handshake phase), all communication between the server and the client can be sniffed by a packet sniffer. Isn't it then possible to sniff the encryption key or other data that is used to set up a secure connection?

    Read the article

  • Don't Change URL in Browser When Clicking <asp:LinkButton>

    - by Corey Goldberg
    I have an ASP.NET page that uses a menu based on asp:LinkButton control in a Master page. When a user selects a menu item, an onclick handler calls a method in my C# code. The method it calls just does a Server.Transfer() to a new page. From what I have read, this is not supposed to change the URL displayed in the browser. The problem is it that the URL changes in the browser as the user navigates the menu to different pages. Here is an item in the menu: <asp:LinkButton id="foo" runat="server" onclick="changeToHelp"><span>Help</span> </asp:LinkButton> In my C# code, I handle the event with a method like: protected void changeToHelp(object sender, EventArgs e) { Server.Transfer("Help.aspx"); } Any ideas how I can navigate through the menu without the browser's URL bar changing?

    Read the article

  • Working with multiple GIT severs

    - by th3flyboy
    Hello, I have a question. Is it possible to set up a system so that you have a private GIT server that you host, which automatically syncs with a remote one, hosted by a site like Sourceforge, and then you can commit your local to the private GIT server, and then when you have to merge the changes from your private wip branches that are on your private GIT over to the master/branch/tag from the public GIT, and then push the change to the public GIT? I ask this because I have a lot of personal work I would like to get working before putting it up for the public to see, and I'm shifting between several computers/operating systems in the process. If this is not possible in standard GIT, are there any other options that would allow me to do this? Thanks, Peter

    Read the article

  • SSRS mysterious extra pages

    I have two reports that are setup with the same page dimensions- A4 portrait, with page margins of 1cm. When I run the reports seperately and print them they both come out as expected: fitting into the width constraint of the page. However, when I include one report as a subreport in the other and then run and print the "master" report I start to experience problems. Even though both reports appear I get extra blank pages appearing every other page in the output. I'm sure I'm missing a simple trick - probably with the page sizes of the two reports but I can't figure it out - any pointers? I don't mind changing the setup of the subreport as it will never be run as a seperate eport in the wild, I only included that step to prove that it did indeed fit within the page!

    Read the article

  • Is it a good idea to use only a key to encrypt an entire (small) filesystem?

    - by Fernando Miguélez
    This question comes as part of my doubts presented on a broader question about ideas implementing a small encrypted filesystem on Java Mobile phones (J2ME, BlackBerry, Android). Provided the litte feedback received, considering the density of the question, I decided to divide those doubts into small questions. So to sum up I plan to "create" an encrypted filesystem for for mobile phones (with the help of BoucyCastle or a subset of JCE), providing an API that let access to them in a transparent way. Encryption would be carried out on a file basis (not blocks). My question is this: Is it a good idea to use only a simmetric key (maybe AES-256) to encrypt all the files (they wouldn't be that many, maybe tens of them) and store this key in a keystore (protected by a pin) or would you rather encrypt each file with an on-the-fly generated key stored alongside each file, encrypting that key with the "master" key stored on the keystore? What are the benefits/drawbacks of each approach?

    Read the article

  • Branch for each developer in GIT repo

    - by Peter
    I'd like to move my project to GitHub from local svn repository. Multiple developers are curently working on this project. I was thinking that each developer should have their own branch in which they would commit changes. When manager review their work, he will merge it into master branch. I don't want separate repository for each developer as GitHub has limited number of private repositories. Is this a good idea? What are other alternatives?

    Read the article

  • ASP.NET: How to assign ID to a field in DetailsView?

    - by jawonlee
    I have a master-detail page, in which I use GridView to display multiple rows of data, and DetailsView + jQuery dialog to display the details of a single records. only one DetailsView is open at a time. I need to be able to pull out a single field of the open DetailsView, for manipulation using JavaScript. Is there a way to give a unique ID to a given field in DetailsView, so I can use getElementByID? Or is there another way to accomplish what I'm trying to do? Thank you in advance.

    Read the article

  • generating dynamic word documents for mass mailing

    - by bluesystem
    I need to generate a mass mailing based on a word document model with PHP. Given is a database with the adresses and the data that need to be filled in my word model. I want to generate a single word document with the different adresses and field contents from the database. We have a Linux server and the COM object is not avalaible. Is there a ready to use class to do this? Did you had any experiance with PHPWord? What is the best practice in this case? In the ideal case the client should just upload th word master document, with the fields that need to be filled and then fusioned to a multiple pages word document containing the whole mailing.

    Read the article

  • s3cmd setacl to grant 'Authenticated Users'

    - by rynop
    I'm using jgit to create a remote in s3. Problem I'm having is when I do a jgit push s3 master it creates the files in s3 as owned by me. I want to keep the files private, and be read/write by 'Authenticated users'. I'd like to be able to either set acl: authenticated-read in the ~/.jgit file OR be able to modify the acl after the push: s3cmd --add-header=x-amz-acl:authenticated-read setacl --acl-private s3://my.bucket/repo/* Neither of these work. How do i use jgit and push to s3 and keep it private, and let anyone with auth read/write?

    Read the article

  • Git: Merge in only one commit

    - by Ivan
    Usually, I work with branches in Git, but I don't like to see hundreds of branches in my working tree (Git history). I'm wondering if there is a method in Git to "join" all commits in a branch in only one commit (ideally with a clear commit message). Something like this: git checkout -b branch <some work> git commit -a -m "commit 1" <some work> git commit -a -m "commit 2" <some work> git commit -a -m "commit 3" git checkout master git SUPER-JOIN branch -m "super commit" After this, only "super commit" will exist in the git log.

    Read the article

< Previous Page | 132 133 134 135 136 137 138 139 140 141 142 143  | Next Page >