Daily Archives

Articles indexed Sunday January 2 2011

Page 21/27 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Pseudorandom Number Generation with Specific Non-Uniform Distributions

    - by carnun
    Hello all, I'm writing a program that simulates various random walks (with differing distributions). At each timestep, I need randomly generated, two dimensional step distances and angles from the distribution of the random walk. I'm hoping someone can check my understanding of how to generate these random numbers. As I understand it I can use Inverse Transform Sampling as follows: If f(x) is the pdf of our random walk that has a non-uniform distribution, and y is a random number from a uniform distribution. Then if we let f(x) = y and solve to find x then we have a random number from the non-uniform distribution. Is this a feasible solution?

    Read the article

  • Resultant of a polynomial with x^n–1

    - by devin.omalley
    Resultant of a polynomial with x^n–1 (mod p) I am implementing the NTRUSign algorithm as described in http://grouper.ieee.org/groups/1363/lattPK/submissions/EESS1v2.pdf , section 2.2.7.1 which involves computing the resultant of a polynomial. I keep getting a zero vector for the resultant which is obviously incorrect. private static CompResResult compResMod(IntegerPolynomial f, int p) { int N = f.coeffs.length; IntegerPolynomial a = new IntegerPolynomial(N); a.coeffs[0] = -1; a.coeffs[N-1] = 1; IntegerPolynomial b = new IntegerPolynomial(f.coeffs); IntegerPolynomial v1 = new IntegerPolynomial(N); IntegerPolynomial v2 = new IntegerPolynomial(N); v2.coeffs[0] = 1; int da = a.degree(); int db = b.degree(); int ta = da; int c = 0; int r = 1; while (db > 0) { c = invert(b.coeffs[db], p); c = (c * a.coeffs[da]) % p; IntegerPolynomial cb = b.clone(); cb.mult(c); cb.shift(da - db); a.sub(cb, p); IntegerPolynomial v2c = v2.clone(); v2c.mult(c); v2c.shift(da - db); v1.sub(v2c, p); if (a.degree() < db) { r *= (int)Math.pow(b.coeffs[db], ta-a.degree()); r %= p; if (ta%2==1 && db%2==1) r = (-r) % p; IntegerPolynomial temp = a; a = b; b = temp; temp = v1; v1 = v2; v2 = temp; ta = db; } da = a.degree(); db = b.degree(); } r *= (int)Math.pow(b.coeffs[0], da); r %= p; c = invert(b.coeffs[0], p); v2.mult(c); v2.mult(r); v2.mod(p); return new CompResResult(v2, r); } There is pseudocode in http://www.crypto.rub.de/imperia/md/content/texte/theses/da_driessen.pdf which looks very similar. Why is my code not working? Are there any intermediate results I can check? I am not posting the IntegerPolynomial code because it isn't too interesting and I have unit tests for it that pass. CompResResult is just a simple "Java struct".

    Read the article

  • css absolute positioning hidden scrollbars ... with a twist

    - by ScottE
    I'm working on a website that targets 1024 X 768 as the minimum resolution. So, we're at about 970px wide. Design came back with an interesting layout that has a centered site with a banner that actually exceeds this width (1288px to be exact) that will look good for users with greater resolution, but look fine at 1024. So, to prevent scrollbars from showing up for those at 1024 I positioned the banner absolutely and used overflow-x: hidden on the body. This works just fine across our target browsers. Now, the client has come back and asked for scrollbars to be present for users on 800 X 600 (yes, this is not the target) so they can see a critical login button. How can this be accommodated for those 2% of their users without making radical changes? All I can think of is to detect their screen width and remove the overflow-x:hidden. You have to love when requirements change late in the build process! Edit - here's what I have that seems simple enough to me - any caveats here? if (screen.width === 800) { $("body").css("overflow-x", "visible"); }

    Read the article

  • Google Maps - user to pinpoint a location

    - by JohnB
    Hi, Is it possible to allow users of my website to mark places on a map I display using Google Maps API? I need to then save that location coordinates to a db. I've been looking through the google maps API, I found that I can use the web service to do searches like this: http://maps.google.com/maps/geo?q=Maine,+United+States&output=json&oe=utf8\&sensor=false&key=my_key But I am not sure it's working on a house number level (which I need it to) and I'm not sure how to display a 'did you mean?' to the user when he misspells the address.. Anyone have an idea? Thanks,

    Read the article

  • [php,mysql] insert only adds upto 1000 records and ignoresall records after that.

    - by user560559
    Hello i have a large database where the client stores personal messages and fire email notifications [if allowed by the users]. certain users have the option of sending messages to their entire network of friends. some users have over 5000 friends in their network so if they select the whole network they'll be sending messages to over 5000 friends and system will store all the messages into a table. the problem is this that it does not insert more than 1000 records and ignores all inserts after the first 1000. i have increased the packet size, bulk_insert_buffer_size but still no luck. since the system stores some of the info in another table for reports, every insert returns its new message id. due to this i can not use the "insert into table (column1,column2) values (value1,value2) , (value1,value2)....etc." table engine is innodb, mysql version is 5.1.3 and is hosted on amazon web services. all i want is to fix this issue of inserting more than 1000 records at a time. as mentioned earlier, it works fine but only up to 1000 records and simply ignores all the records after that. i'm using php foreach(){} to insert message for each friend and if email is available, send notification to the user. this foreach(){} also inserts the same record in another table [with only 3 columns] for generating reports. thank you in advance for all the help and support. WMA.

    Read the article

  • JAVA Procedure Error

    - by Sam....
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Procedure 'STP_Insert_tblReceipt' expects parameter '@CPVFlag', which was not supplied. I m getting error at This Point when trying to call procedure... Everything is perfect ,,,Count of Question marks are similar to parameter provided cs = conn.prepareCall("{call STP_Insert_tblReceipt(?,?,?, ?,?,?, ?,?,?, ?,?,?, ?,?,?, ?,?,?, ?,?,?, ?,?,?, ?,?,?)}"); // cs = conn.prepareCall("{call STP_Receipt_Form_Insertion_Trial(?,?,?, ?,?,?, ?,?,?, ?,?,?, ?)}"); cs.setLong(1, Long.parseLong(txtMobileNo.getText())); cs.setString(2, String.valueOf(cboDistributor.getSelectedItem())); cs.setLong(3, Long.parseLong(txtBoxNo.getText())); cs.setInt(4, Integer.parseInt(txtFileNo.getText())); cs.setString(5, pickUp_date); cs.setString(6, rec_date); cs.setString(7, String.valueOf(cmbCtrlNo.getSelectedItem())); cs.setString(8, UserName); cs.setString(9, rec_date); cs.setString(10, RegionLocation); cs.setString(11, txtRemark.getText().trim()); cs.setString(12, txtSimNo.getText().trim()); cs.setInt(13, 2); cs.setString(14, String.valueOf(cmbAryanRegion.getSelectedItem())); cs.setString(15, String.valueOf(cboPickUpType.getSelectedItem())); cs.setString(16, String.valueOf(txtCafNo.getText())); cs.setString(17, distributorId); //cs.setString(18, circleName); cs.setString(18, cboCircle.getSelectedItem().toString()); cs.registerOutParameter(19, java.sql.Types.INTEGER); cs.setString(20, auditorName); cs.setString(21, retailerName); cs.setString(22, retailerCode); cs.setInt(23, mappedFlag); //cs.setString(24, distCode); cs.setString(24, cboDistCode.getSelectedItem().toString()); //cs.setString(25, zoneName); cs.setString(25, cboZone.getSelectedItem().toString()); cs.setString(26, comment); **cs.setInt(27, 1);** **this is for CPV Flag** After this cs.execute();

    Read the article

  • Python command line - add PYTHONPATH during module run

    - by orokusaki
    I want to run: python somescript.py somecommand But, when I run this I need PYTHONPATH to include a certain directory. I can't just add it to my environment variables because the directory I want to add changes based on what project I'm running. Is there a way to alter PYTHONPATH while running a script? Note: I don't even have a PYTHONPATH variable, so I don't need to worry about appending to it vs overriding it during running of this script.

    Read the article

  • Mapping Repeating Sequence Groups in BizTalk

    - by Paul Petrov
    Repeating sequence groups can often be seen in real life XML documents. It happens when certain sequence of elements repeats in the instance document. Here’s fairly abstract example of schema definition that contains sequence group: <xs:schemaxmlns:b="http://schemas.microsoft.com/BizTalk/2003"            xmlns:xs="http://www.w3.org/2001/XMLSchema"            xmlns="NS-Schema1"            targetNamespace="NS-Schema1" >  <xs:elementname="RepeatingSequenceGroups">     <xs:complexType>       <xs:sequencemaxOccurs="1"minOccurs="0">         <xs:sequencemaxOccurs="unbounded">           <xs:elementname="A"type="xs:string" />           <xs:elementname="B"type="xs:string" />           <xs:elementname="C"type="xs:string"minOccurs="0" />         </xs:sequence>       </xs:sequence>     </xs:complexType>  </xs:element> </xs:schema> And here’s corresponding XML instance document: <ns0:RepeatingSequenceGroupsxmlns:ns0="NS-Schema1">  <A>A1</A>  <B>B1</B>  <C>C1</C>  <A>A2</A>  <B>B2</B>  <A>A3</A>  <B>B3</B>  <C>C3</C> </ns0:RepeatingSequenceGroups> As you can see elements A, B, and C are children of anonymous xs:sequence element which in turn can be repeated N times. Let’s say we need do simple mapping to the schema with similar structure but with different element names: <ns0:Destinationxmlns:ns0="NS-Schema2">  <Alpha>A1</Alpha>  <Beta>B1</Beta>  <Gamma>C1</Gamma>  <Alpha>A2</Alpha>  <Beta>B2</Beta>  <Gamma>C2</Gamma> </ns0:Destination> The basic map for such typical task would look pretty straightforward: If we test this map without any modification it will produce following result: <ns0:Destinationxmlns:ns0="NS-Schema2">  <Alpha>A1</Alpha>  <Alpha>A2</Alpha>  <Alpha>A3</Alpha>  <Beta>B1</Beta>  <Beta>B2</Beta>  <Beta>B3</Beta>  <Gamma>C1</Gamma>  <Gamma>C3</Gamma> </ns0:Destination> The original order of the elements inside sequence is lost and that’s not what we want. Default behavior of the BizTalk 2009 and 2010 Map Editor is to generate compatible map with older versions that did not have ability to preserve sequence order. To enable this feature simply open map file (*.btm) in text/xml editor and find attribute PreserveSequenceOrder of the root <mapsource> element. Set its value to Yes and re-test the map: <ns0:Destinationxmlns:ns0="NS-Schema2">  <Alpha>A1</Alpha>  <Beta>B1</Beta>  <Gamma>C1</Gamma>  <Alpha>A2</Alpha>  <Beta>B2</Beta>  <Alpha>A3</Alpha>  <Beta>B3</Beta>  <Gamma>C3</Gamma> </ns0:Destination> The result is as expected – all corresponding elements are in the same order as in the source document. Under the hood it is achieved by using one common xsl:for-each statement that pulls all elements in original order (rather than using individual for-each statement per element name in default mode) and xsl:if statements to test current element in the loop:  <xsl:templatematch="/s0:RepeatingSequenceGroups">     <ns0:Destination>       <xsl:for-eachselect="A|B|C">         <xsl:iftest="local-name()='A'">           <Alpha>             <xsl:value-ofselect="./text()" />           </Alpha>         </xsl:if>         <xsl:iftest="local-name()='B'">           <Beta>             <xsl:value-ofselect="./text()" />           </Beta>         </xsl:if>         <xsl:iftest="local-name()='C'">           <Gamma>             <xsl:value-ofselect="./text()" />           </Gamma>         </xsl:if>       </xsl:for-each>     </ns0:Destination>  </xsl:template> BizTalk Map editor became smarter so learn and use this lesser known feature of XSLT 2.0 in your maps and XSL stylesheets.

    Read the article

  • Referring EDMX file in Separate VS Project from T4 Template

    - by Paul Petrov
    In my project I needed to separate template generated entities, context in separate projects from the EDMX file. I’ve stumbled across this problem how to make template generator to find edmx file without hardcoding absolute path into the template. Using relative path directly (inputFile=@”..\ProjectFolder\DataModel.edmx”) generated error: Error      2              Running transformation: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\ProjectFolder\DataModel.edmx' The code that worked well for me when placed in the beginning of the .tt file: … string rootPath = Host.ResolvePath(String.Empty); string relativePath = @"..\\ProjectDir\\DataModel.edmx"; string inputFile = Path.Combine(rootPath, relativePath); EdmItemCollection ItemCollection = loader.CreateEdmItemCollection(inputFile); …

    Read the article

  • BizTalk HL7 Receive Pipeline Exception

    - by Paul Petrov
    If you experience sequence of errors below with BizTalk HL7 MLLP receive ports you may need to request a hotfix from Microsoft. Knowledge base article number is 2454887 but it’s still not available on the KB site. The hotfix is recently released and you may need to open support ticket to get to it. It requires three other hotfixes installed: ·         970492 (DASM 3.7.502.2) ·         973909 (additional ACK codes) ·         981442 (Microsoft.solutions.btahl7.mllp.dll 3.7.509.2) If the exceptions below repeatedly appear in the event log you most likely would be helped by the hotfix: Fatal error encountered in 2XDasm. Exception information is Cannot access a disposed object. Object name: 'CEventingReadStream'. There was a failure executing the receive pipeline: "BTAHL72XPipelines.BTAHL72XReceivePipeline, BTAHL72XPipelines, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Source: "BTAHL7 2.X Disassembler" Receive Port: "ReceivePortName" URI: "IPAddress:portNumber" Reason: Cannot access a disposed object. Object name: 'CEventingReadStream'. The Messaging Engine received an error from transport adapter "MLLP" when notifying the adapter with the BatchComplete event. Reason "Object reference not set to an instance of an object." We’ve been through a lot of troubleshooting with Microsoft Product Support and they did a great job finding an issue and releasing a fix.

    Read the article

  • Resolve local subdomain on apache for paths within user dir

    - by MaoPU
    On Apache 2.2.x I've activated mod_userdir. I used the default setup, so that http://localhost/~name/ will be connect with ~name/public_html/ and a path within public_html, e.g. ~name/public_html/mySite can be reached through http://localhost/~name/mySite. How can I achieve, that the same path can be reached through http://mySite.name.localhost/? I don't want a manual approach like it is suggested in other SF questions (such as http://serverfault.com/q/133921/53624), but rather want an automatic mapping of all available paths to the corresponding URL. I think, several steps will need to be taken: Change mod_userdir configuration, so that the subdomain of localhost will be connected with all available user names on the machine. The second step would maybe include the usage of mod_rewrite, so that the subsubdomain could be matched to the path within ~name/public_html... What would be your prefered way?

    Read the article

  • How to move or delete files from a folder containing 2 million files on an NTFS drive?

    - by Beau
    The issue is that any modification to the directory locks up Explorer indefinitely, though Samba access to other directories still works. I've tried moving files locally and over Samba. Even enumerating the directory to get the list of files locks up the computer indefinitely. I tried using Python's win32file.FindFilesIterator to iterate the files but that also hangs. My idea was to move each file to a different directory (in a directory above the directory we're dealing with) based on its timestamp, so that we'd have at most a thousand or so files in each directory... But since I can't even enumerate the files, that's been a non-starter. If I have to give up and just nuke the directory I'm willing to do that, but a standard delete also hangs indefinitely. I have set these two parameters to increase speed and they also did not help the issue: R:\>fsutil behavior query disablelastaccess disablelastaccess = 1 R:\>fsutil behavior query disable8dot3 disable8dot3 = 1 These are all sequential images that would have run into the 'bug' with 8.3 filenames whereby many similarly named files in one directory can take a long time to compute 8.3 filenames. From what I understand this data is stored in the file system even after disable8dot3 is enabled, so it may still be contributing to the problem. Any ideas?

    Read the article

  • Bold font shortcut in WordPress editor in Mac OS X? (The equivalent to Ctrl+b in Windows)

    - by javipas
    I've recently acquired a MacBook Air and I'm getting used to Mac OS X shortcuts. One that I can't find, though, is the change to bold a piece of text previously selected in the WordPress editor. I do this with a simple Ctrl+b after selecting the text in Windows, but the expected Command+b in Mac OS X does not work (in WordPress at least. It seems it works in other editors online and offline). Is there a shortcut for it... and for italics?

    Read the article

  • Proper application shutdown before windows xp auto shutdown

    - by vashman
    I frequently leave the computer on playing a movie or downloading a file while I go to bed. I do use the 'shutdown computer when finished' feature of KMPlayer or getright or uTorrent or whatever program I am using. This method effectively shuts down the computer, but the problem is that there are some applications that seem to exit forcefully when doing this kind of shutdown, this being clearly reflected in winamp not saving the current playlist and config, messenger not saving the chat logs, etc. My goal here would be to have automatically close properly all applications when the auto/scheduled program triggers it. I am looking for some Windows shutdown mode/setting that does application closing like the user would do. I am not expecting to auto-click on save dialogs prompts, if this is needed I will do it before leaving the computer on for auto shutdown.

    Read the article

  • Sony Vaio Sleep Mode

    - by someone11
    I have a problem with the sleep mode on Sony Vaio F Series and Windows 7 x64. If I wake it up by opening the lid and pressing power button everything works fine. However, if I wake it up on some other way (e.g. move the mouse), power light turns green and fan starts spinning, but LCD is dark and I cannot use keyboard (well, actually there is no sign that anyting works). Only thing I can do is to reboot it by pressing power button. Does anyone know what could be the problem?

    Read the article

  • mac's .dll equivalent

    - by kalaracey
    Hello all-- so, a DLL is similar to a folder, but it allows for multiple programs/executables to access it at once, thus conserving memory (I think). What is Mac's equivalent of a DLL? I was looking through the Google Chrome folders inside ~/Library/Application Support, and instead of the regular Windows Default.dll there was just a folder, "Default" as a regular file, with contents, I assume, would regularly be inside the DLL. Does the Mac equivalent provide the same function?

    Read the article

  • Does software RAID 1 in Windows 7 improve read speeds?

    - by Rich
    As the title says, does software RAID 1 (mirroring) in Windows 7 improve read speeds? I'd like to set up RAID 1 to help protect my important documents (yes, yes, I know it's not a backup), but performance is also important to me. As I understand it, RAID 1 should theoretically be able to improve my read speeds by n times, where n is the number of disks. Is Windows 7 able to get this boost? I haven't been able to find out this information anywhere.

    Read the article

  • How does one set up a MIDI keyboard

    - by Martin Owens -doctormo-
    I would like to set up my keyboard via my midi-sport 2x2, I've plugged everything in and even installed the midisport-firmware package which was not automatically installed for some reason. The goal is to have the computer produce a piano sound when keys of the keyboard are hit. If you can make this work without jack, that would be good too. Step by step instructions, the less complexity the better.

    Read the article

  • How to reboot into Windows from Ubuntu?

    - by andrewsomething
    I'm looking for a way to reboot into Windows from Ubuntu on a 10.10/Vista dual boot system. The specific use case is that I would like to be able to ssh into my running Ubuntu instance and issue a command that will initiate a reboot directly into Windows. I found a promising blog post, but the script that it suggests isn't working: #!/bin/bash WINDOWS_ENTRY=`grep menuentry /boot/grub/grub.cfg | grep --line-number Windows` MENU_NUMBER=$(( `echo $WINDOWS_ENTRY | sed -e "s/:.*//"` - 1 )) sudo grub-reboot $MENU_NUMBER sudo reboot man grub-reboot isn't much help, but it seems to be leading me in the right direction: set the default boot entry for GRUB, for the next boot only WINDOWS_ENTRY=`grep menuentry /boot/grub/grub.cfg | grep --line-number Windows` MENU_NUMBER=$(( `echo $WINDOWS_ENTRY | sed -e "s/:.*//"` - 1 )) echo $MENU_NUMBER This returns the expected value, but on reboot the first menu entry is still highlighted. Any ideas why this isn't working or suggestions for other solutions?

    Read the article

  • How to have table span the entire height?

    - by Yogendra
    Hi All, I have a html table and I am trying to have it span the entire page height. For some reason I am not able to get this to work. I have set the html, body and table height to be 100%, but the table still does not occupy the entire 100%. Heres the code. It is very basic because I am just trying to have the table occupy the entire height. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication1.WebForm1" %> <style type="text/css"> body,html { margin:0; padding:0; height:100%; } </style> <table border="2" cellpadding="0" cellspacing="0" style="height:100%; width:100%" > <tr> <td>ABCD</td> </tr> </table> </form> I tried for couple of hours and I could not get it to work. Any help is really appreciated.

    Read the article

  • What are some techniques to monitor multiple instances of a piece of software?

    - by Geo Ego
    I have a piece of self-serve kiosk software that will be running at multiple sites. I'd like to monitor their status remotely. The kiosk application itself is pretty much finished. I am now in the process of creating a piece of software that will monitor all of the kiosks from a central location so that the customer can view particular details remotely (for instance, how many bills are in the acceptor's cash cartridge, what customer is currently logged in, etc.). Because I am in such an early stage of development, my options are quite open. I understand that I'm not giving very many qualifications, but I'd like to try to get a good variety of potential solutions. Some details: Kiosk software is a VB6 app running on Windows Embedded Monitoring software will be run on a modern desktop version of Windows (either XP, Vista, or 7) Database is SQL Server 2008 My initial idea was to develop a .NET app that would simply report the last database transaction for each kiosk at a set interval (say every second or so) but I'd really like for the kiosk software to report its status directly. I'm not exactly sure where to begin in terms of what modifications may need to be made to the kiosk software, and what the monitoring software will require. Links to articles on these topics would be most welcome.

    Read the article

  • Access Denied Java FileWriter / FileInputStream

    - by Matt
    My program downloads a websites source code, modifies it, creates the file, and then reuploads it through the FTP. However, I receive the following error when trying to open the created file: java.io.FileNotFoundException: misc.html (Access is denied) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(Unknown Source) at Manipulator.uploadSource(Manipulator.java:63) at Start.addPicture(Start.java:130) at Start$2.actionPerformed(Start.java:83) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) When I navigate to the folder directory and attempt to open "misc.html" with Notepad I receive Access is Denied. My code is fairly simple: File f = new File(page.sourceFileName); try { FileWriter out = new FileWriter(f); out.write(page.source); out.close(); } catch (IOException e) { e.printStackTrace(); } InputStream input = new FileInputStream(f); This is the vital excerpt from my program. I have copied this into a different test program and it works fine, I create a misc.html file and reopen it with both FileInputStream and manually. I would be worried about Administrator rights but the Test program works fine when I run it RIGHT after the problem program. I also have checked if the file exists and is a file with File methods and it is as well. Is this a result of me not closing a previous Input/Output properly? I've tried to check everything and I am fairly positive I close all streams as soon as they finish... Help! :)

    Read the article

  • Can't import clojure records

    - by Zubair
    I have created a record like this: (defrecord User [user-id email]) :but when I try to access it from another name-space I get the error: (User. "name" "email") java.lang.IllegalArgumentException: Unable to resolve classname: User It works when I do: (oe.model.modelcore.User. "name" "email") : I know I will need to import the Java class, but is there any way for clojure to do this automatically when I do: (use 'oe.model.modelcore :reload)

    Read the article

  • sql server replication algorithm.

    - by reggie
    Anyone know how the underlying replication model in sql server works? Do they essentially depend on UTC datetime values to determine if something is new or do they keep a table of all the changes (like a table of tableID+rowid that have changed). I am building my own "replication" system and was planning on using the dates to know what to replicate. Then I started wondering what would happen if the date got off in the computer for some reason. The obvious choice is to keep a log of the changes as you go and once you replicate those changes, you remove from the log of changes. But thats a lot of extra work, instead of just checking dates. I figure if sql server replication works by just checking the dates, then that should be good enough for me. Any wisdom here? thanks

    Read the article

  • Creating a loading screen in HTML5

    - by espais
    I am having some issues finding a decent tutorial for generating a loading style screen with regards to HTML5. To be quite honest I'm not sure exactly where to begin... My project is essentially a simple HTML5 game, where I'll be loading in various sprite sheets and tilesets. They'll be reasonably small, but I'd like to show a little loading spinner instead of a blank screen while all the resources are loaded. Much appreciated if somebody could point me in the right direction, be it decent links or code samples to get me going...my Google-fu is lacking today! For clarification, I need to figure out how to load the resources themselves, as opposed to finding a spinner. For instance, how to calculate that X% has loaded.

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27  | Next Page >