Search Results

Search found 1588 results on 64 pages for 'pure'.

Page 52/64 | < Previous Page | 48 49 50 51 52 53 54 55 56 57 58 59  | Next Page >

  • Issue encondig java->xls

    - by Xerg
    This is not a pure java question and can also be related to HTML I've written a java servlet that queries a database table and shows the result as a html table. The user can also ask to receive the result as an Excel sheet. Im creating the Excel sheet by printing the same html table, but with the content-type of "application/vnd.ms-excel". The Excel file is created fine. The problem is that the tables may contain non-english data so I want to use a UTF-8 encoding. PrintWriter out = response.getWriter(); response.setContentType("application/vnd.ms-excel:ISO-8859-1"); //response.setContentType("application/vnd.ms-excel:UTF-8"); response.setHeader("cache-control", "no-cache"); response.setHeader("Content-Disposition", "attachment; filename=file.xls"); out.print(src); out.flush(); The non-english characters appear as garbage (áéíóú) Also I tried converting to bytes from String byte[] arrByte = src.getBytes("ISO-8859-1"); String result = new String(arrByte, "UTF-8"); But I Still getting garbage, What can I do?. Thanks

    Read the article

  • Execute less compiler anywhere on the computer

    - by Xenioz
    I'm having a little problem with executing *.cmd files so I can execute them anywhere on the computer with cmd. What I exactly want is to execute the less.cmd file, which support optional arguments and uses lessc.wsf (Less.js compiler for Windows Script Host) for converting less css to pure css. The less.cmd contains: ::For convenience @cscript //nologo "%~dp0lessc.wsf" %* What I've done so far: added absolute path to lessc.cmd to the PATH system variable and moved .cmd in the PATHTEXT system variable to the beginning. Also did this: From a command prompt; assoc .bat should return with ..bat=batfile If not assoc .bat=batfile to restore the default file type association. ftype batfile should return with batfile="%1" %* If not ftype batfile="%1" %* to restore the default "Open" action for the file type. This still doesn't work unless I approach the cmd file with a absolute path in cmd, if I enter lessc anywhere else then I get C:\Intel Intel is not recognized as an internal or external command, operable program or batch file. , I've restarted my computer more than once to be sure changes will take effect. I hope somebody has the answer.

    Read the article

  • Best way to do interprocess communication on Mac OS X

    - by jbrennan
    I'm looking at building a Cocoa application on the Mac with a back-end daemon process (really just a mostly-headless Cocoa app, probably), along with 0 or more "client" applications running locally (although if possible I'd like to support remote clients as well; the remote clients would only ever be other Macs or iPhone OS devices). The data being communicated will be fairly trivial, mostly just text and commands (which I guess can be represented as text anyway), and maybe the occasional small file (an image possibly). I've looked at a few methods for doing this but I'm not sure which is "best" for the task at hand. Things I've considered: Reading and writing to a file (…yes), very basic but not very scalable. Pure sockets (I have no experience with sockets but I seem to think I can use them to send data locally and over a network. Though it seems cumbersome if doing everything in Cocoa Distributed Objects: seems rather inelegant for a task like this NSConnection: I can't really figure out what this class even does, but I've read of it in some IPC search results I'm sure there are things I'm missing, but I was surprised to find a lack of resources on this topic.

    Read the article

  • Canonical resource for forms-based design in ASP.NET MVC?

    - by Robert Harvey
    Is there a resource on the web that describes various form scenarios in ASP.NET MVC, and gives example solutions within a sensible, consistent design philosophy? Examples of such scenarios might be: One-to-many forms, like invoice data-entry forms. Foreign-table forms such as Add New User in a form that requires specifying a user Forms that require dynamic interaction, using Ajax or JSON. Popup forms Forms requiring multiple data records to be input, without postbacks. Note that there is considerable conceptual and technological overlap among these example scenarios. I am aware that there is a vast patchwork quilt of available technologies and examples out there that provide partial solutions and pieces of solutions, such as jQuery Ajax, CSS, and so forth. But I would like guidance in using these technologies in more effective and consistent ways. I am not considering web forms integration with an ASP.NET MVC application; I would still like my applications to be pure MVC. Nor am I, at the moment, considering a paid solution like Telerik. But I would like to know if someone has already done some of the work combining these technologies into a consistent, cohesive whole, that follows a sensible design philosophy. (an open source framework, perhaps?)

    Read the article

  • How to suppress/control logging of Wagon-FTP Maven extension?

    - by Vincenzo
    I'm deploying Maven site by FTP, using Wagon-FTP. Works fine, but output is full of FTP connection/authentication details, which effectively expose logins and passwords to everybody (especially if the project is open source and its CI protocols are publicly accessible): [...] [INFO] [INFO] --- maven-site-plugin:3.0-beta-3:deploy (default-deploy) @ rempl --- Reply received: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ---------- 220-You are user number 1 of 50 allowed. 220-Local time is now 09:08. Server port: 21. 220 You will be disconnected after 15 minutes of inactivity. Command sent: USER **** Reply received: 331 User **** OK. Password required Command sent: PASS ******** Reply received: 230-User **** has group access to: *** 230 OK. Current restricted directory is / [...] Is it possible to suppress this logging? Or configure it... This is a section of my pom.xml, where Wagon-FTP is used: [...] <build> <extensions> <extension> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-ftp</artifactId> <version>1.0-beta-7</version> </extension> </extensions> [...] </build> [...]

    Read the article

  • Efficient method to calculate the rank vector of a list in Python

    - by Tamás
    I'm looking for an efficient way to calculate the rank vector of a list in Python, similar to R's rank function. In a simple list with no ties between the elements, element i of the rank vector of a list l should be x if and only if l[i] is the x-th element in the sorted list. This is simple so far, the following code snippet does the trick: def rank_simple(vector): return [rank for rank in sorted(range(n), key=vector.__getitem__)] Things get complicated, however, if the original list has ties (i.e. multiple elements with the same value). In that case, all the elements having the same value should have the same rank, which is the average of their ranks obtained using the naive method above. So, for instance, if I have [1, 2, 3, 3, 3, 4, 5], the naive ranking gives me [0, 1, 2, 3, 4, 5, 6], but what I would like to have is [0, 1, 3, 3, 3, 5, 6]. Which one would be the most efficient way to do this in Python? Footnote: I don't know if NumPy already has a method to achieve this or not; if it does, please let me know, but I would be interested in a pure Python solution anyway as I'm developing a tool which should work without NumPy as well.

    Read the article

  • Jetty embedded: How to run the same config as with `mvn jetty:run-exploded`?

    - by Ondra Žižka
    Hi, I'd like to have the same Jetty server configuration, created programatically. When I run mvn jetty:run-exploded, my app works fine. When I run it from my code, the static content is not loaded. I know that I have to add a static content Servlet, so I tried: Server server = new Server(8080); Context ctx = new Context( server, "/", Context.SESSIONS ); DefaultServlet defaultServlet = new DefaultServlet(); ServletHolder defaultSH = new ServletHolder( defaultServlet ); defaultSH.setInitParameter( "resourceBase", "./"); ctx.addServlet( defaultSH, "/img" ); ctx.addServlet( defaultSH, "/css" ); ctx.addServlet( defaultSH, "/js" ); I am assuming that the pwd is in the webapp's "root", i.e. where the WEB-INF dir is. This does not work. Anyway. Is somewhere a clean block of pure Java code which will give me the exact same server config as the mvn jetty:run-explodeds default? Thanks for help, Ondra

    Read the article

  • Combining aggregate functions in an (ANSI) SQL statement

    - by morpheous
    I have aggregate functions foo(), foobar(), fredstats(), barneystats() I want to create a domain specific query language (DSQL) above my DB, to facilitate using using a domain language to query the DB. The 'language' comprises of boolean expressions (or more specifically SQL like criteria) which I then 'translate' back into pure (ANSI) SQL and send to the underlying Db. The following lines are examples of what the language statements will look like, and hopefully, it will help further clarify the concept: **Example 1** DQL statement: foobar('yellow') between 1 and 3 and fredstats('weight') > 42 Translation: fetch all rows in an underlying table where computed values for aggregate function foobar() is between 1 and 3 AND computed value for AGG FUNC fredstats() is greater than 42 **Example 2** DQL statement: fredstats('weight') < barneystats('weight') AND foo('fighter') in (9,10,11) AND foobar('green') <> 42 Translation: Fetch all rows where the specified criteria matches **Example 3** DQL statement: foobar('green') / foobar('red') <> 42 Translation: Fetch all rows where the specified criteria matches **Example 4** DQL statement: foobar('green') - foobar('red') >= 42 Translation: Fetch all rows where the specified criteria matches Given the following information: The table upon which the queries above are being executed is called 'tbl' table 'tbl' has the following structure (id int, name varchar(32), weight float) The result set returns only the tbl.id, tbl.name and the names of the aggregate functions as columns in the result set - so for example the foobar() AGG FUNC column will be called foobar in the result set. So for example, the first DQL query will return a result set with the following columns: id, name, foobar, fredstats Given the above, my questions then are: What would be the underlying SQL required for Example1 ? What would be the underlying SQL required for Example3 ? Given an algebraic equation comprising of AGGREGATE functions, Is there a way of generalizing the algorithm needed to generate the required ANSI SQL statement(s)? I am using PostgreSQL as the db, but I would prefer to use ANSI SQL wherever possible.

    Read the article

  • DataReader-DataSet Hybrid solution

    - by G33kKahuna
    My solution architects and I have exhausted both pure Dataset and Datareader solutions. Basically we have a Microsoft.NET 2.0 windows service application that pulls data based on a query and processes additional tasks per record; almost a poor mans workflow system. The recordsets are broader (in terms of the columns) and deeper (in terms of number of records). We observed that DataSet performs much better in terms of performance but runs into contraints as # of records increase say 100K+ we start seeing System.OutOfMemoryException on a 4G machine with processModel configured to run at memoryLimit set to 85. Since this is a multi-threaded app, there could be multiple threads processing different queries and building different DataSets, so we run into the exception sooner in that case DataReader on the other hand works but is a lot slower and hits other contraints; if there is some sort of disconnect it has to start over again or leaves open connections on the DB side and worst case takes down the service completely etc. So, we decided the best option would be some sort of hybrid solution. I'm open to guidance and suggestions. Are there any hybrid solutions available? Any other suggestions

    Read the article

  • Problem resizing loader after loading swf

    - by DanK
    I'm using the following code to load an swf in a pure actionscript project (Flex Builder 3) _loader = new Loader(); _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, Loader_Complete); _loader.contentLoaderInfo.addEventListener(Event.INIT, Loader_Init); var request:URLRequest = new URLRequest("Skins/TestSkin.swf"); _loader.load(request); this.addChild(_loader); This works okay and displays the swf on the stage (500x375 for some reason - not sure why, TestSkin.swf is a flex app with no defined width and height) However, when I try to scale the swf so that it will fill the stage, I have problems. I have tried: Setting _loader.width and _loader.height in my Loader_Complete handler Setting _loader.width and _loader.height in my Loader_Init handler Setting _loader.content.width and loader.content.height in my Loader_Complete handler Setting _loader.content.width and loader.content.height in my Loader_Init handler I have seen examples online where people say these work for them but whenever I set width or height in any of these ways, the loaded swf is simply not displayed at all. Any idea what could be causing this? What is the correct way to resize an swf that has been loaded with a Loader object?

    Read the article

  • Given 4 objects, how to figure out whether exactly 2 have a certain property

    - by Cocorico
    Hi guys! I have another question on how to make most elegant solution to this problem, since I cannot afford to go to computer school right so my actual "pure programming" CS knowledge is not perfect or great. This is basically an algorhythm problem (someone please correct me if I am using that wrong, since I don't want to keep saying them and embarass myself) I have 4 objects. Each of them has an species property that can either be a dog, cat, pig or monkey. So a sample situation could be: object1.species=pig object2.species=cat object3.species=pig object4.species=dog Now, if I want to figure out if all 4 are the same species, I know I could just say: if ( (object1.species==object2.species) && (object2.species==object3.species) && (object3.species==object4.species) ) { // They are all the same animal (don't care WHICH animal they are) } But that isn't so elegant right? And if I suddenly want to know if EXACTLY 3 or 2 of them are the same species (don't care WHICH species it is though), suddenly I'm in spaghetti code. I am using Objective C although I don't know if that matters really, since the most elegant solution to this is I assume the same in all languages conceptually? Anyone got good idea? Thanks!!

    Read the article

  • Making Vim auto-indent PHP/HTML using alternative syntax

    - by njbair
    I edit PHP in Vim and have enjoyed the auto-indenting, but PHP's alternative syntax doesn't auto-indent how I would like. For instance, in an HTML template, Vim doesn't recognize the open control structure in the same way it does when using braces. Example: <html> <body> <p> <?php if (1==1): ?> This line should be indented. <?php endif; ?> </p> </body> </html> I want Vim to recognize the open control structure and indent the HTML within it. Another example which uses pure PHP: <?php if (1==1): echo "This line gets indented"; echo "This one doesn't"; endif; ?> The indentation is terminated by the semicolon, even though the control structure is still open. Does anybody know how to get Vim to work in these situations? Thanks.

    Read the article

  • Java many to many association map

    - by Raphael Jolivet
    Hi, I have to classes, ClassA and ClassB and a "many to many" AssociationClass. I want to use a structure to hold the associations between A and B such as I can know, for each instance of A or B, which are their counterparts. I thought of using a Hashmap, with pair keys: Hasmap<Pair<ClassA, ClassB>, AssociationClass> associations; This way, I can add and remove an association between two instances of ClassA and ClassB, and I can query a relation for two given instances. However, I miss the feature of getting all associations defined for a given instance of ClassA or ClassB. I could do it by brute force and loop over all keys of the map to search for associations between a given instance, but this is inefficient and not elegant. Do you know of any data structure / free library that enables this ? I don't want to reinvent the wheel. Thanks in advance for your help, Raphael NB: This is not a "database" question. These objects are pure POJO used for live computation, I don't need persistence stuff.

    Read the article

  • Cannot use await in Portable Class Library for Win 8 and Win Phone 8

    - by Harry Len
    I'm attempting to create a Portable Class Library in Visual Studio 2012 to be used for a Windows 8 Store app and a Windows Phone 8 app. I'm getting the following error: 'await' requires that the type 'Windows.Foundation.IAsyncOperation' have a suitable GetAwaiter method. Are you missing a using directive for 'System'? At this line of code: StorageFolder guidesInstallFolder = await Package.Current.InstalledLocation.GetFolderAsync(guidesFolder); My Portable Class Library is targeted at .NET Framework 4.5, Windows Phone 8 and .NET for Windows Store apps. I don't get this error for this line of code in a pure Windows Phone 8 project, and I don't get it in a Windows Store app either so I don't understand why it won't work in my PCL. The GetAwaiter is an extension method in the class WindowsRuntimeSystemExtensions which is in System.Runtime.WindowsRuntime.dll. Using the Object Browser I can see this dll is available in the .NET for Windows Store apps component set and in the Windows Phone 8 component set but not in the .NET Portable Subset. I just don't understand why it wouldn't be in the Portable Subset if it's available in both my targeted platforms.

    Read the article

  • generating and unmarshalling java classes while unmarshalling input contains a DTD

    - by Hans Westerbeek
    Hi, For a Spring-based project, I have the following situation to solve: I have XML files coming in whose contents I will have to parse at runtime. Those XML files come with a DTD reference. I need to generate the classes that the unmarshaller churns out using the right at build time, using the Maven2 plugin for the unmarshalling library of choice. This is also not very hard to do, once I have generated an XSD from the DTD. I want to use spring-oxm's UnMarshaller interface to do the unmarshalling at runtime. This I understand how to do. The xml files come in with a DTD reference, and all unmarshalling libraries out there want to do unmarshalling based on an XSD. Now, as described in the castor documentation, I can convert the DTD to an XSD and keep it on the classpath. However, when an actual XML file comes into the system it will still have that DTD reference at the top, and there's nothing I can really do about that (except for string replacing which feels hacky in this case). Will this cause the unmarshaller, like Castor to fail? Am I right in suspecting that this DTD reference will cause the unmarshalling to fail? Could I do pure DTD-based unmarshalling? Or can this somehow be prevented by providing detailed configuration to the unmarshaller? Until now, I have tried castor, xmlbeans and xstream. Which would fit my purposes best? Has anyone else been in this situation? Did you also end up just doing manual DOM or SAX parsing?

    Read the article

  • Grails or Play! for an ex-RoR developer ?

    - by Kedare
    Hello, I plan to begin learning a Java web framework (I love the Java API), I already used Rails and Django. I want something close to Java, but without all the complexity of J2EE. I've found 2 framework that could be good for me : Grails : Grails looks great, it use Groovy that is better than Java for web application (I think..), but it's slower, that use pure-java components (Hibernate, Strut, Spring), it looks pretty simple to deploy (send .war and it's ok !), the GSP is great ! It's a bit harder to debug (need to restart the server at each modification, and the stacktrace is a mix of Java and Groovy stack that is not always understandable..) Play! : This framework also looks great, it's faster than Grails (It's use directly Java), but I don't really like how it use Java, it modify the source code to transform the properties call as setXXX/getXXX, I'm not kind of that... The framework also have caching function that Grails don't (alreary) has. I don't really like the Template Engine. It's also easer to debug (no need to restart the server, and the stacktrace is clear) What do you recommend for ? I am looking for something easy to learn (I used a lot ruby and java, but a little bit java (But I love the Java API)), that is full featured (That's no a problem with all the Java Library availables, but if it's bundle and integrated I prefer), that scale and that is not too slow (faster than ruby), and if possible I would want something with a decent community to easily find support and answer to my questions ;) PS: No JRuby on Rails Thank you !

    Read the article

  • How to easily substitute a Base class

    - by JTom
    Hi, I have the following hierarchy of classes class classOne { virtual void abstractMethod() = 0; }; class classTwo : public classOne { }; class classThree : public classTwo { }; All classOne, classTwo and classThree are abstract classes, and I have another class that is defining the pure virtual methods class classNonAbstract : public classThree { void abstractMethod(); // Couple of new methods void doIt(); void doItToo(); }; And right now I need it differently...I need it like class classNonAbstractOne : public classOne { void abstractMethod(); // Couple of new methods void doIt(); void doItToo(); }; class classNonAbstractTwo : public classTwo { void abstractMethod(); // Couple of new methods void doIt(); void doItToo(); }; and class classNonAbstractThree : public classThree { void abstractMethod(); // Couple of new methods void doIt(); void doItToo(); }; But all the nonAbstract classes have the same new methods, with the same code...and I would like to avoid copying all the methods and it's code to every nonAbstract class. How could I accomplish that? Hopefully it's understandable...

    Read the article

  • Multiple Unpacking Assignment in Python when you don't know the sequence length

    - by doug
    The textbook examples of multiple unpacking assignment are something like: import numpy as NP M = NP.arange(5) a, b, c, d, e = M # so of course, a = 0, b = 1, etc. M = NP.arange(20).reshape(5, 4) # numpy 5x4 array a, b, c, d, e = M # here, a = M[0,:], b = M[1,:], etc. (ie, a single row of M is assigned each to a through e) (My Q is not numpy specfic; indeed, i would prefer a pure python solution.) W/r/t the piece of code i'm looking at now, i see two complications on that straightforward scenario: i usually won't know the shape of M; and i want to unpack a certain number of items (definitely less than all items) and i want to put the remainder into a single container so back to the 5x4 array above, what i would very much like to be able to do is, for instance, assign the first three rows of M to a, b, and c respectively (exactly as above) and the rest of the rows (i have no idea how many there will be, just some positive integer) to a single container, all_the_rest = []. I'm not sure if i have explained this clearly; in any event, if i get feedback i'll promptly edit my Question.

    Read the article

  • What is the the relation between programming and mathematics?

    - by Math Grad
    Programmers seem to think that their work is quite mathematical. I understand this when you try to optimize something in performance, find the most efficient alogithm, etc.. But it patently seems false when you look at a billing application for a shop, or a systems software riddled with I/O calls. So what is it exactly? Is computation and associated programming really mathematical? Here I have in mind particularly the words of the philosopher Schopenhauer in mind: That arithmetic is the basest of all mental activities is proved by the fact that it is the only one that can be accomplished by means of a machine. Take, for instance, the reckoning machines that are so commonly used in England at the present time, and solely for the sake of convenience. But all analysis finitorum et infinitorum is fundamentally based on calculation. Therefore we may gauge the “profound sense of the mathematician,” of whom Lichtenberg has made fun, in that he says: “These so-called professors of mathematics have taken advantage of the ingenuousness of other people, have attained the credit of possessing profound sense, which strongly resembles the theologians’ profound sense of their own holiness.” I lifted the above quote from here. It seems that programmers are doing precisely the sort of mechanized base mental activity the grand old man is contemptuous about. So what exactly is the deal? Is programming really the "good" kind of mathematics, or just the baser type, or altogether something else just meant for business not to be confused with a pure discipline?

    Read the article

  • PostgreSQL, Foreign Keys, Insert speed & Django

    - by Miles
    A few days ago, I ran into an unexpected performance problem with a pretty standard Django setup. For an upcoming feature, we have to regenerate a table hourly, containing about 100k rows of data, 9M on the disk, 10M indexes according to pgAdmin. The problem is that inserting them by whatever method literally takes ages, up to 3 minutes of 100% disk busy time. That's not something you want on a production site. It doesn't matter if the inserts were in a transaction, issued via plain insert, multi-row insert, COPY FROM or even INSERT INTO t1 SELECT * FROM t2. After noticing this isn't Django's fault, I followed a trial and error route, and hey, the problem disappeared after dropping all foreign keys! Instead of 3 minutes, the INSERT INTO SELECT FROM took less than a second to execute, which isn't too surprising for a table <= 20M on the disk. What is weird is that PostgreSQL manages to slow down inserts by 180x just by using 3 foreign keys. Oh, disk activity was pure writing, as everything is cached in RAM; only writes go to the disks. It looks like PostgreSQL is working very hard to touch every row in the referred tables, as 3MB/sec * 180s is way more data than the 20MB this new table takes on disk. No WAL for the 180s case, I was testing in psql directly, in Django, add ~50% overhead for WAL logging. Tried @commit_on_success, same slowness, I had even implemented multi row insert and COPY FROM with psycopg2. That's another weird thing, how can 10M worth of inserts generate 10x 16M log segments? Table layout: id serial primary, a bunch of int32, 3 foreign keys to small table, 198 rows, 16k on disk large table, 1.2M rows, 59 data + 89 index MB on disk large table, 2.2M rows, 198 + 210MB So, am I doomed to either drop the foreign keys manually or use the table in a very un-Django way by defining saving bla_id x3 and skip using models.ForeignKey? I'd love to hear about some magical antidote / pg setting to fix this.

    Read the article

  • C#/.NET library for source code formatting, like the one used by Stack Overflow?

    - by Lasse V. Karlsen
    I am writing a command line tool to convert Markdown text to html output, which seems easy enough. However, I am wondering how to get nice syntax coloring for embedded code blocks, like the one used by Stack Overflow. Does anyone know either: What library StackOverflow is using or if there's a library out there that I can easily reuse? Basically it would need to have some of the same "intelligence" found in the one that Stack Overflow uses, by basically doing a best-attempt at figuring out the language in use to pick the right keywords. Basically, what I want is for my own program to handle a block like the following: if (a == 0) return true; if (a == 1) return false; // fall-back Markdown Sharp, the library I'm using, by default outputs the above as a simple pre/code html block, with no syntax coloring. I'd like the same type of handling as the formatting on Stack Overflow does, the above contains blue "return" keywords for example. Or, hmm, after checking the source of this Stack Overflow page after adding the code example, I notice that it too is formatted like a simple pre/code block. Is it pure javascript-magic at works here, so perhaps there's no such library? If there's no library that will automagically determine a possible language by the keywords used, is there one that would work if I explicitly told it the language? Since this is "my" markdown-commandline-tool, I can easily add syntax if I need to.

    Read the article

  • Suggestions for a Cron like scheduler in Python?

    - by jamesh
    I'm looking for a library in Python which will provide at and cron like functionality. I'd quite like have a pure Python solution, rather than relying on tools installed on the box; this way I run on machines with no cron. For those unfamiliar with cron: you can schedule tasks based upon an expression like: 0 2 * * 7 /usr/bin/run-backup # run the backups at 0200 on Every Sunday 0 9-17/2 * * 1-5 /usr/bin/purge-temps # run the purge temps command, every 2 hours between 9am and 5pm on Mondays to Fridays. The cron time expression syntax is less important, but I would like to have something with this sort of flexibility. If there isn't something that does this for me out-the-box, any suggestions for the building blocks to make something like this would be gratefully received. Edit I'm not interested in launching processes, just "jobs" also written in Python - python functions. By necessity I think this would be a different thread, but not in a different process. To this end, I'm looking for the expressivity of the cron time expression, but in Python. Cron has been around for years, but I'm trying to be as portable as possible. I cannot rely on its presence.

    Read the article

  • CSS Multiple multi-column divs

    - by accelerate
    I have a bunch of items (text, image, mixed content, etc) that I want to display. The user can define what row and what column that item appears in. For example, in row 1, there could be two items/columns, both images. In row two, there could be three items / columns, one with an image, two others as pure text. Oh, and the user may specify the width of any particular column/image/item. I have a solution that uses multiple tables that works. In essence, each row is a new table. This works for the most part. I'm wondering if I can use just divs? Now my CSS foo is lacking, and I tried to copy examples from the web, and I haven't been able to get it working. Right now I have something like this: `[for each row] [for each column] [content] ` But everything is overlapping each other. I've also tried using "position: relative", but things look even more borked. So can divs actually be used for multiple rows and different number of columns?

    Read the article

  • File Storage for Web Applications: Filesystem vs DB vs NoSQL engines

    - by El Yobo
    I have a web application that stores a lot of user generated files. Currently these are all stored on the server filesystem, which has several downsides for me. When we move "folders" (as defined by our application) we also have to move the files on disk (although this is more due to strange design decisions on the part of the original developers than a requirement of storing things on the filesystem). It's hard to write tests for file system actions; I have a mock filesystem class that logs actions like move, delete etc, without performing them, which more or less does the job, but I don't have 100% confidence in the tests. I will be adding some other jobs which need to access the files from other service to perform additional tasks (e.g. indexing in Solr, generating thumbnails, movie format conversion), so I need to get at the files remotely. Doing this over network shares seems dodgy... Dealing with permissions on the filesystem as sometimes given us problems in the past, although now that we've moved to a pure Linux environment this should be less of an issue. What are the downsides of storing files as BLOBs in MySQL? I guess that it would massively increase the database size and reduce the effectiveness of caches, but are there other problems? Do the same problems exist with NoSQL systems like Cassandra? Does anyone have any other suggestions that might be appropriate?

    Read the article

  • Can I get consistent CSS colors across browsers?

    - by Trevor Burnham
    I'm testing a new site, and I have a div with background-color: #bbf6bb; That seems innocuous enough to me. And yet, on my MacBook Pro, the color looks very different in Firefox 3.6 vs. Safari 4. In Safari, it's the color I'd expect from the hex value: a pale green. In Firefox, there's a definite bluish tint, making the color turquoise. I'm aware of color inconsistencies that result from different treatment of images across browsers, but in pure CSS? Really? I'm guessing that Firefox trying to correct for my display in hopes of delivering better consistency with print, but I'd much rather have my site look the same hue to my users regardless of their choice of browser. Any ideas? Can someone confirm that Firefox is the culprit here? [Update: This seems to have been a fluke. Specifically, it's a narrow issue with Firefox—see my answer below. I'm puzzled, but relieved.]

    Read the article

< Previous Page | 48 49 50 51 52 53 54 55 56 57 58 59  | Next Page >