Search Results

Search found 140 results on 6 pages for 'packing'.

Page 1/6 | 1 2 3 4 5 6  | Next Page >

  • Bin packing part 6: Further improvements

    - by Hugo Kornelis
    In part 5 of my series on the bin packing problem, I presented a method that sits somewhere in between the true row-by-row iterative characteristics of the first three parts and the truly set-based approach of the fourth part. I did use iteration, but each pass through the loop would use a set-based statement to process a lot of rows at once. Since that statement is fairly complex, I am sure that a single execution of it is far from cheap – but the algorithm used is efficient enough that the entire...(read more)

    Read the article

  • How to generate simple Packing List with MySQL ?

    - by Stephen
    Hi, I need help on how to create a packing list of a shipment with MySQL. Let's say i have 32 boxes of keyboard ready to ship, the master carton can contain 12 boxes. I only have value 32 boxes and volume of 12. The other value in result below is generated by sql command. Not coming from record. So this easily calculate that the number of master carton would be 3 master cartons, with one as a non-standard quantity. How to perform query on this ? As i would like to be this result: +----------+---------------+-------------------+--------+------------+---------+ | Quantity | Standard_Qty | Non_Standard_Qty | Box_N | Box_Total | RowType | +----------+---------------+-------------------+--------+------------+---------+ | 12 | 1 | 0 | 1 | 3 | Detail | | 12 | 1 | 0 | 2 | 3 | Detail | | 8 | 0 | 1 | 3 | 3 | Detail | | 32 | 2 | 1 | | | Summary | +----------+---------------+-------------------+--------+------------+---------+ It looks like two query i know and probably the use of FLOOR command, in which i was teach in here. How to make this result? Thanks in advance. Stephen

    Read the article

  • 3 dimensional bin packing algorithms

    - by BuschnicK
    I'm faced with a 3 dimensional bin packing problem and am currently conducting some preliminary research as to which algorithms/heuristics are currently yielding the best results. Since the problem is NP hard I do not expect to find the optimal solution in every case, but I was wondering: 1) what are the best exact solvers? Branch and Bound? What problem instance sizes can I expect to solve with reasonable computing resources? 2) what are the best heuristic solvers? 3) What off-the-shelf solutions exist to conduct some experiments with?

    Read the article

  • Polygon packing 2D

    - by Ilnur
    Hi! I have problem of packing 2 arbitrary polygons. I.e. we have 2 arbitrary polygons. We are to find such placement of this polygons (we could make rotations and movements), when rectangle, which circumscribes this polygons has minimal area. I know, that this is a NP-complete problem. I want to choose an efficient algorithm for solving this problem. I' looking for No-Fit-Polygon approach. But I could't find anywhere the simple and clear algorithm for finding the NFP of two arbitrary polygons.

    Read the article

  • More interactive ZODB packing

    - by Mikko Ohtamaa
    Hi, Current ZMI management "Pack database" functionality is little rough. 1) Could it be possible to have some kind of progress indicator for web UI? E.g. one telling how many minutes/hours are left giving at least some kind of estimate 2) How does ZODB packing affect the responsivity of the site? Are all transactions blocked? 3) Any command line scripts with progress indicator available so you could do this from a ZEO command line client? 4) At least some kind of log markers to logout output... [INFO] 30% done... 3:15 to go

    Read the article

  • 2D packing with obstacles

    - by cime
    Anybody know of an efficient algorithm for moving rectangles in a square which contains obstacles? Rectangles: can rotate can move must not collide with obstacles (black squares) Obstacles: can't be moved can be added anywhere Goal: move rectangles until you can

    Read the article

  • C/C++ packing signed char into int

    - by aaa
    hello I have need to pack four signed bytes into 32-bit integral type. this is what I came up to: int byte(char c) { return (unsigned char)c; } int pack(char c0, char c1, ...) { return byte(c0) | byte(c1) << 8 | ...; } is this a good solution? Is it portable? is there a ready-made solution, perhaps boost? Thanks

    Read the article

  • Packing differently sized chunks of data into multiple bins

    - by knizz
    EDIT: It seems like this problem is called "Cutting stock problem" I need an algorithm that gives me the (space-)optimal arrangement of chunks in bins. One way would be put the bigger chunks in first. But see how that algorithm fails in this example: Chunks Bins ----------------------------- AAA BBB CC DD ( ) ( ) Algorithm Result ----------------------------- biggest first (AAABBB ) (CC ) optimal (AAACCDD) (BBB) "Biggest first" can't fit in DD. Maybe it helps to build a table like this: Size 1: --- Size 2: CC, DD Size 3: AAA, BBB Size 4: CCDD Size 5: AAACC, AAADD, BBBCC, BBBDD Size 6: AAABBB Size 7: AAACCDD, BBBCCDD Size 8: AAABBBCC, AAABBBDD Size 10: AAABBBCCDD

    Read the article

  • C++ packing a typdef enum

    - by Sagar
    typedef enum BeNeLux { BELGIUM, NETHERLANDS, LUXEMBURG } _PACKAGE_ BeNeLux; When I try to compile this with C++ Compiler, I am getting errors, but it seems to work fine with a C compiler. So here's the question. Is it possible to pack an enum in C++, or can someone see why I would get the error? The error is: "semicolon missing after declaration of BeNeLux". I know, after checking and rechecking, that there definitely is a semicolon there, and in any places required in the rest of the code.

    Read the article

  • C++ packing a typedef enum

    - by Sagar
    typedef enum BeNeLux { BELGIUM, NETHERLANDS, LUXEMBURG } _PACKAGE_ BeNeLux; When I try to compile this with C++ Compiler, I am getting errors, but it seems to work fine with a C compiler. So here's the question. Is it possible to pack an enum in C++, or can someone see why I would get the error? The error is: "semicolon missing after declaration of BeNeLux". I know, after checking and rechecking, that there definitely is a semicolon there, and in any places required in the rest of the code.

    Read the article

  • Packing up files on my machine, sending it to a server, and unpacking it

    - by MxyL
    I am implementing a feature in my application that sends all files in a specified folder to a server. I have the basic FTP transaction set up using Apache Commons FTPClient: it sets up a connection and transfers a file from one place to another. So I can simply loop over the directory and use this connection to transfer all the files. However, this could be better. Rather than transferring each file one by one, it makes more sense to pack it up in a compressed archive and then send the whole file at once. Saves time and bandwidth, since these are just text files so they compress nicely. So I would like to add automatic archive packing and unpacking. This is the workflow I have planned out, using zip compression: Zip all files in the folder Send the file over Unzip the files at its destination 1 and 2 are easy since the files are on the local machine, but I'm not sure how to accomplish the last step, when the files are now on a remote server. What are my options? I have control over what I can put and run on the server. Perhaps it is not necessary to do the packing/unpacking myself?

    Read the article

  • Bin Packing Problems: The SQL

    The 'bin packing' problem isn't just a fascination for computer scientists, but comes up in a whole range of real-world applications. It isn't that easy to come up with a practical, set oriented solution in SQL that gives a near-optimal result. Get smart with SQL Backup ProPowerful centralised management, encryption and more.SQL Backup Pro was the smartest kid at school. Discover why.

    Read the article

  • Approach for packing 2D shapes while minimizing total enclosing area

    - by Dennis
    Not sure on my tags for this question, but in short .... I need to solve a problem of packing industrial parts into crates while minimizing total containing area. These parts are motors, or pumps, or custom-made components, and they have quite unusual shapes. For some, it may be possible to assume that a part === rectangular cuboid, but some are not so simple, i.e. they assume a shape more of that of a hammer or letter T. With those, (assuming 2D shape), by alternating direction of top & bottom, one can pack more objects into the same space, than if all tops were in the same direction. Crude example below with letter "T"-shaped parts: ***** xxxxx ***** x ***** *** ooo * x vs * x vs * x vs * x o * x * xxxxx * x * x o xxxxx xxx Right now we are solving the problem by something like this: using CAD software, make actual models of how things fit in crate boxes make estimates of actual crate dimensions & write them into Excel file (1) is crazy amount of work and as the result we have just a limited amount of possible entries in (2), the Excel file. The good things is that programming this is relatively easy. Given a combination of products to go into crates, we do a lookup, and if entry exists in the Excel (or Database), we bring it out. If it doesn't, we say "sorry, no data!". I don't necessarily want to go full force on making up some crazy algorithm that given geometrical part description can align, rotate, and figure out best part packing into a crate, given its shape, but maybe I do.. Question Well, here is my question: assuming that I can represent my parts as 2D (to be determined how), and that some parts look like letter T, and some parts look like rectangles, which algorithm can I use to give me a good estimate on the dimensions of the encompassing area, while ensuring that the parts are packed in a minimal possible area, to minimize crating/shipping costs? Are there approximation algorithms? Seeing how this can get complex, is there an existing library I could use? My thought / Approach My naive approach would be to define a way to describe position of parts, and place the first part, compute total enclosing area & dimensions. Then place 2nd part in 0 degree orientation, repeat, place it at 180 degree orientation, repeat (for my case I don't think 90 degree rotations will be meaningful due to long lengths of parts). Proceed using brute force "tacking on" other parts to the enclosing area until all parts are processed. I may have to shift some parts a tad (see 3rd pictorial example above with letters T). This adds a layer of 2D complexity rather than 1D. I am not sure how to approach this. One idea I have is genetic algorithms, but I think those will take up too much processing power and time. I will need to look out for shape collisions, as well as adding extra padding space, since we are talking about real parts with irregularities rather than perfect imaginary blocks. I'm afraid this can get geometrically messy fairly fast, and I'd rather keep things simple, if I can. But what if the best (practical) solution is to pack things into different crate boxes rather than just one? This can get a bit more tricky. There is human element involved as well, i.e. like parts can go into same box and are thus a constraint to be considered. Some parts that are not the same are sometimes grouped together for shipping and can be considered as a common grouped item. Sometimes customers want things shipped their way, which adds human element to constraints. so there will have to be some customization.

    Read the article

  • Packing jar files into library jar files

    - by Hillel
    Firstly, this question is not about packing a simple jar file (e.g. lwjgl) into a runnable jar file. I know how to do this using JarSplice. So if I have a game which uses JInput, I will pack my game jar and jinput.jar using JarSplice and enter the natives in the process. The problem arises when I want to create a custom library that uses JInput, and then pack that into my games. See, the whole idea of writing a game library is that I don't ever have to even copy code like the wrapper I wrote for JInput Controller, and I always have a definitive version inside a library jar. Basically what I wanna do is create a jar file of my library, pack jinput.jar into it using JarSplice, possibly with the natives as well, and then when I want to export a jar of my game, I either export it automatically through Eclipse with the library jar, or, if that doesn't work, use JarSplice. I've tried several solutions, and nothing works. When I try to pack the game jar and the library jar using JarSplice, I get an error saying that there's either duplicate .project or .classpath. When I try to export my game through Eclipse with the library jar, it won't run (which is to be expected), but then, if I try to attach the natives with JarSplice, it doesn't give me any errors but the jar doesn't run. I'm not expecting anyone to solve this, but if anyone has an idea, something that will allow me to never look at the Gamepad code ever again, that would be awesome. I don't care if I have to package my library jar using JarSplice 5 times, and then do the same with the game jar, as long as it works. Otherwise I'll just have to copy the Gamepad class into every project alongside the library jar. :(

    Read the article

  • Packing for JavaOne

    - by Tori Wieldt
    While you are packing for JavaOne, here are some things to remember to bring:1) A Jacket!While October is considered the summer in San Francisco, the heat only lasts a day or two. The fog can roll in any day, and it can be chilly (and maybe even rain).2) Your Oracle LoginMake sure your have your Oracle.com account log in details with you when you arrive onsite in San Francisco.  This is the username and password you used/created for your JavaOne 2012 registration.  You'll need these to check in and get your badge as well as to gain access to My Account and Schedule Builder onsite at the event. 3) Walking ShoesYou'll want comfortable and practical shoes as this city requires lots of walking and has lots of hills.4) Thumb DrivesWhen sharing cool code, nothing beats sneaker-net. That said, practice safe computing. 5) Consider Downloading a Ride-Sharing Service AppSideCar, Lyft, Uber and RelayRides are taking SF by storm, and are popular alternative to yellow taxis. These are unregulated ride-sharing services, so ride at your own risk. Hipster Tips for SF 1) Don't call it Frisco.2) If you wear shorts, don't complain about how cold it is.3) Bright colored clothes are for tourists. Locals wear black. 4) The most fun ice-cream flavors in town are at Humphry-Slocombe. Check out "secret breakfast."5) The Mission is hip.6) Don't expect there to be a Starbuck's or anything besides a great view at the other side of the Golden Gate bridge.7) SF has seasons, they are just more subtle.

    Read the article

  • Packing a DBF

    - by Tom Hines
    I thought my days of dealing with DBFs as a "production data" source were over, but HA (no such luck). I recently had to retrieve, modify and replace some data that needed to be delivered in a DBF file. Everything was fine until I realized / remembered the DBF driver does not ACTUALLY delete records from the data source -- it only marks them for deletion.  You are responsible for handling the "chaff" either by using a utility to remove deleted records or by simply ignoring them.  If imported into Excel, the marked-deleted records are ignored, but the file size will reflect the extra content. So, I went hunting for a method to "Pack" the records (removing deleted ones and resizing the DBF file) and eventually ran across the FOXPRO driver at ( http://msdn.microsoft.com/en-us/vfoxpro/bb190233.aspx ).  Once installed, I changed the DSN in the code to the new one I created in the ODBC Administrator and ran some tests.  Using MSQuery, I simply tested the raw SQL command Pack {tablename} and it WORKED! One really neat thing is the PACK command is used like regular SQL instructions; "Pack {tablename}" is all that is needed. It is necessary, however, to close all connections to the database before issuing the PACK command.    Here is some C# code for a Pack method.         /// <summary>       /// Pack the DBF removing all deleted records       /// </summary>       /// <param name="strTableName">The table to pack</param>       /// <param name="strError">output of any errors</param>       /// <returns>bool (true if no errors)</returns>       public static bool Pack(string strTableName, ref string strError)       {          bool blnRetVal = true;          try          {             OdbcConnectionStringBuilder csbOdbc = new OdbcConnectionStringBuilder()             {                Dsn = "PSAP_FOX_DBF"             };             string strSQL = "pack " + strTableName;             using (OdbcConnection connOdbc = new OdbcConnection(csbOdbc.ToString()))             {                connOdbc.Open();                OdbcCommand cmdOdbc = new OdbcCommand(strSQL, connOdbc);                cmdOdbc.ExecuteNonQuery();                connOdbc.Close();             }          }          catch (Exception exc)          {             blnRetVal = false;             strError = exc.Message;          }          return blnRetVal;       }

    Read the article

  • Packing a DBF

    - by Tom Hines
    I thought my days of dealing with DBFs as a "production data" source were over, but HA (no such luck). I recently had to retrieve, modify and replace some data that needed to be delivered in a DBF file. Everything was fine until I realized / remembered the DBF driver does not ACTUALLY delete records from the data source -- it only marks them for deletion.  You are responsible for handling the "chaff" either by using a utility to remove deleted records or by simply ignoring them.  If imported into Excel, the marked-deleted records are ignored, but the file size will reflect the extra content.  After several rounds of testing CRUD, the output DBF was huge. So, I went hunting for a method to "Pack" the records (removing deleted ones and resizing the DBF file) and eventually ran across the FOXPRO driver at ( http://msdn.microsoft.com/en-us/vfoxpro/bb190233.aspx ).  Once installed, I changed the DSN in the code to the new one I created in the ODBC Administrator and ran some tests.  Using MSQuery, I simply tested the raw SQL command Pack {tablename} and it WORKED! One really neat thing is the PACK command is used like regular SQL instructions; "Pack {tablename}" is all that is needed. It is necessary, however, to close all connections to the database (and re-open) before issuing the PACK command or you will get the "File is in use" error.    Here is some C# code for a Pack method.         /// <summary>       /// Pack the DBF removing all deleted records       /// </summary>       /// <param name="strTableName">The table to pack</param>       /// <param name="strError">output of any errors</param>       /// <returns>bool (true if no errors)</returns>       public static bool Pack(string strTableName, ref string strError)       {          bool blnRetVal = true;          try          {             OdbcConnectionStringBuilder csbOdbc = new OdbcConnectionStringBuilder()             {                Dsn = "PSAP_FOX_DBF"             };             string strSQL = "pack " + strTableName;             using (OdbcConnection connOdbc = new OdbcConnection(csbOdbc.ToString()))             {                connOdbc.Open();                OdbcCommand cmdOdbc = new OdbcCommand(strSQL, connOdbc);                cmdOdbc.ExecuteNonQuery();                connOdbc.Close();             }          }          catch (Exception exc)          {             blnRetVal = false;             strError = exc.Message;          }          return blnRetVal;       }

    Read the article

  • Packing an exe + dll into one executable (not .NET)

    - by Bluebird75
    Hi, Is anybody aware of a program that can pack several DLL and a .EXE into one executable. I am not talking about .NET case here, I am talking about general DLLs, some of which I generate in C++, some of others are external DLL I have no control over. My specific case is a python program packaged with py2exe, where I would like to "hide" the other DLL by packing them. The question is general enough though. The things that had a look at: ILMerge: specific to .NET NETZ: specific to .NET UPX: does DLL compression but not multiple DLL + EXE packing FileJoiner: Almost got it. It can pack executable + anything into one exe but when opened, it will launch the default opener for every file that was packed. So, if the user user dlldepend installed, it will launch it (becaues that's the default dll opener). Maybe that's not possible ? Summary of the answers: DLL opening is managed by the OS, so packing DLL into executable means that at some point, they need to be extracted to a place where the OS can find them. No magic bullet. So, what I want is not possible. Unless... We change something in the OS. Thanks Conrad for pointing me to ThinInstall, which virtualise the application and the OS loading mechanism. With ThinInstall, it is possible to pack everything in one exe (DLL, registry settings, ...).

    Read the article

  • Automation of EAR packing

    - by glebreutov
    I need to automate packing of Java EE projects into EAR archive in Eclipse. The most easy way, I think, is using Ant script. But writing of Ant from start is routine and long task. Is there a way to generate Ant script based on my actions in eclipse (like macros in MS Office)? Or, maybe, exists easier way to do this? Thanks!

    Read the article

  • Packing values into a single int

    - by user303907
    Hello, Let's say I have a couple of variables like apple, orange, banana I have 8 apples, 1 orange, 4 bananas. Is it possible to somehow convert those values into a single integer and also revert back to their original values based on the computed integer value? I found an example online. int age, gender, height; short packed_info; . . . // packing packed_info = (((age << 1) | gender) << 7) | height; . . . // unpacking height = packed_info & 0x7f; gender = (packed_info >>> 7) & 1; age = (packed_info >>> 8); But it doesn't seem to work as it should when I entered random numbers.

    Read the article

  • PyGTK: Packing widgets before tabs in a gtk.Notebook

    - by Ben Ashton
    Basically, what I want to do is put some buttons before the tabs in a gtk.Notebook. I tried making my own notebook type widget and it worked well, but it would have required lots more work to make it as flexible as I would like, also it wasn't as efficient. Here is a mock-up of what I'm trying to achieve: http://imagebin.ca/view/84SC0d.html Any ideas would be much appreciated, thanks. Ben.

    Read the article

  • Packing jQuery plugin - jFeed

    - by David Neale
    I have a modified version of the jFeed plugin and now want to pack the four source files. There is a Makefile and some perl scripts in the download but I don't know how to use them. This is the file structure: \Makefile \proxy.php \src\jatom.js \src\jfeed.js \src\jfeeditem.js \src\jrss.js \build\packer\jsPacker.pl \build\packer\Pack.pm \build\packer\ParseMaster.pm

    Read the article

  • Packing a long binary integer in Ruby

    - by user1056142
    I'm trying to send a very long binary integer over UDP (on the order of 200 bits). When I try to use Array's pack method, it complains the string I'm trying to convert is too large. Am I going about this the wrong way? ruby-1.8.7-p352 :003 > [0b1101001010101101111010100101010011010101010110010101010101010010010101001010101010101011101010101010101111010101010101010101].pack('i') RangeError: bignum too big to convert into `unsigned long' from (irb):3:in `pack' from (irb):3 This number is supposed to represent a DNS query packet (this is for a homework assignment; we're not allowed to use any DNS libraries).

    Read the article

  • How to packing Resources in Maven Project?

    - by Rehman
    I am looking for suggestion in putting image file maven web project. One of classes under src/main/java need to use an image file. My problem is, if i put image file under src/main/webapp/images then application server cannot find that path on runtime(where myeclipse can ) because war archive do not have specified path "src/main/webapp/images". My question is where should i put the image file that my project can find it without prompting any error or exception. I am using Java Web Application with Mavenized falvour MyEclipse 10 Application Server: JBoss 6 Currently i do have following dir structure Project Directory Structure -src/main/java -- classes -src/main/resources -- applicationContext.xml -src/test/java -- test classes -src/test/resources (nothing) -src -- main --- webapp --WEB-INF --Images --Css --Meta-INF -target -pom.xml And pom.xml's build snippet is as follows <build> <sourceDirectory>${basedir}/src/main/java</sourceDirectory> <outputDirectory>${basedir}/target/${project.artifactId}/classes</outputDirectory> <resources> <resource> <directory>${basedir}/src/main/resources</directory> <excludes> <exclude>**/*.java</exclude> </excludes> </resource> </resources> <testResources> <testResource> <directory>${basedir}/src/test/resources</directory> </testResource> </testResources> <finalName>${project.artifactId}</finalName> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>${jdk.version}</source> <target>${jdk.version}</target> <optimize>true</optimize> <useProjectReferences>true</useProjectReferences> </configuration> </plugin> <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.1.1</version> <configuration> <warSourceDirectory>${basedir}/src/main/webapp</warSourceDirectory> <webResources> <resource> <directory>${basedir}/src/main/resources</directory> </resource> </webResources> </configuration> </plugin> </plugins> </build> Thanks in advance

    Read the article

1 2 3 4 5 6  | Next Page >