Daily Archives

Articles indexed Thursday December 13 2012

Page 4/16 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Changing set_timezone does not always take effect

    - by LearneR
    I have two table table-1 id date-time ----------------------- 1 2012-12-13 15:20:13 table-2 id date-time ----------------------- 1 2012-12-13 15:20:13 Now i am selecting the record with mysql set_timezone function Case-1 SET time_zone='+00:00'; SELECT `date-time` FROM `table-1`; // 2012-12-13 09:50:13 Case-2 SET time_zone='+00:00'; SELECT `date-time` FROM `table-2`; // 2012-12-13 15:20:13 ---Not converting to specified timezone In case-1 it's giving converted date-time, but not in Case-2. What would be the issue?

    Read the article

  • Designing model/database for distance between any two locations (that may change)

    - by Yo Ludke
    We should create a web app which has a number of events each with a location (created as user-generated content, so the number of events will be increasingly large). The distance between any events should be available, for example to determine the top 5 closest events and such things. Users may change the locations of events. How should one design the database/model for this (in a scalable way)? I was thinking of doing it with a "distance table" (like so http://www.deutschland-tourist.info/images/entfernungstabelle.gif). Then every time, if a location changes, one row and one column have to be recalculated (this should be done with a delayed job, because it is not important to have the changes instantly). Possible problems in Scaling: Database to large (n² items for n events), too much calculation to be done. For example we should see if this is okay for 10.000 users. If each has created just one event, then this would be 100 million integers... Do you think this would be a good way to do it efficiently? How could one realize such a distance table with an rails model? Is it possible with a SQL databse? Would you start other approaches?

    Read the article

  • How to add an image when generating a pdf-file with javascript. When adding the imageLoadFromURL no pdf is generated

    - by Angu Handschuh
    I've got a problem with adding an image when generating a pdf-file with javascript. Here is my code: <!DOCTYPE html> <html> <head> <script type="text/javascript" src="base64.js"></script> <script type="text/javascript" src="sprintf.js"></script> <script type="text/javascript" src="jspdf.js"></script> <script> function demo1() { var name = prompt('Name: '); var nachname=prompt('Nachname: '); var doc = new jsPDF(); doc.setFontSize(22); doc.text(20, 20, 'Der eingegebene Text'); doc.setFontSize(16); doc.imageLoadFromUrl('image.jpg'); doc.imagePlace(20, 40); doc.text(20, 30, 'Name: ' + name); doc.text(20,40,'Nachname:'+nachname); // Output as Data URI doc.output('datauri'); } </script> </head> <body> <h2> Ein Document </h2> <a href="javascript:demo1()"> PDF erstellen </a> </body> </html> Before adding doc.imageLoadFromUrl('image.jpg'); doc.imagePlace(20, 40); the code runs without picture. It starts with a demand note for the name and the second name, after this it generates a pdf-file. But when adding the imageLoad-Method there is no pdf-file generated. Does anyone konws how to solve this problem?

    Read the article

  • Problems with list<T> in Asp.Net c#

    - by Johnathan Nardia
    I'm making a web app in Asp.Net using c# that lets you add items into the list. My problem is that each time that i click the button to add a new item into the list , its just shows me the last item and the list counter shows me only 1 . What am I doing wrong?? Here is the code : public partial class home : System.Web.UI.Page { List<string> messageboxs = new List<string>(); public string val = ""; public string data = ""; protected void Button1_Click(object sender, EventArgs e) { val = ""; messageboxs.Add(text1.Text); ListBox1.DataSource = messageboxs; ListBox1.DataBind(); val = messageboxs.Count.ToString(); } }

    Read the article

  • Segmentation fault on certain inputs and not others

    - by Brandon Schwandt
    Heres a function I wrote that has some debugging elements in it already. When i enter either a "y" or a "Y" as the input I get a segmentation fault during runtime. When I enter any other value the code runs. The seg fault kicks out after it scans and gives me the response but before the "scan worked" line is output. DOn't know why it would act like this only on these values. If anyone needs the function call I have that as well. query_user(char *response [10]) { printf("response after query call before clear=%s\n",response); strcpy(response,""); printf("response after clearing before scan=%s\n",response); printf("Enter another person into the line? y or n\n"); scanf("%s", response); printf("response after scan=%s\n",response); printf("scan worked"); } main() { char response [10]; strcpy(response,"y"); printf("response=%s\n",response); printf("When finished with program type \"done\" to exit\n"); while (strcmp(response,"done") != 0) { printf("response after while loop and before query call=%s\n",response); query_user(&response); } } output on error: response after query call before clear=y response after clearing before scan= Enter another person into the line? y or n y response after scan=y Segmentation Fault (core dumped) output on non-error: response after query call before clear=y response after clearing before scan= Enter another person into the line? y or n n response after scan=n scan worked Cycle number 0 (program continues to run outside this function)

    Read the article

  • Better way to compare neighboring cells in matrix

    - by HyperCube
    Suppose I have a matrix of size 100x100 and I would like to compare each pixel to its direct neighbor (left, upper, right, lower) and then do some operations on the current matrix or a new one of the same size. A sample code in Python/Numpy could look like the following: (the comparison 0.5 has no meaning, I just want to give a working example for some operation while comparing the neighbors) import numpy as np my_matrix = np.random.rand(100,100) new_matrix = np.array((100,100)) my_range = np.arange(1,99) for i in my_range: for j in my_range: if my_matrix[i,j+1] > 0.5: new_matrix[i,j+1] = 1 if my_matrix[i,j-1] > 0.5: new_matrix[i,j-1] = 1 if my_matrix[i+1,j] > 0.5: new_matrix[i+1,j] = 1 if my_matrix[i-1,j] > 0.5: new_matrix[i-1,j] = 1 if my_matrix[i+1,j+1] > 0.5: new_matrix[i+1,j+1] = 1 if my_matrix[i+1,j-1] > 0.5: new_matrix[i+1,j-1] = 1 if my_matrix[i-1,j+1] > 0.5: new_matrix[i-1,j+1] = 1 This can get really nasty if I want to step into one neighboring cell and start from it to do a similar task... Do you have some suggestions how this can be done in a more efficient manner? Is this even possible?

    Read the article

  • How to write efficient code for extracting Noun phrases?

    - by Arun Abraham
    I am trying to extract phrases using rules such as the ones mentioned below on text which has been POS tagged 1) NNP - NNP (- indicates followed by) 2) NNP - CC - NNP 3) VP - NP etc.. I have written code in this manner, Can someone tell me how i can do in a better manner. List<String> nounPhrases = new ArrayList<String>(); for (List<HasWord> sentence : documentPreprocessor) { //System.out.println(sentence.toString()); System.out.println(Sentence.listToString(sentence, false)); List<TaggedWord> tSentence = tagger.tagSentence(sentence); String lastTag = null, lastWord = null; for (TaggedWord taggedWord : tSentence) { if (lastTag != null && taggedWord.tag().equalsIgnoreCase("NNP") && lastTag.equalsIgnoreCase("NNP")) { nounPhrases.add(taggedWord.word() + " " + lastWord); //System.out.println(taggedWord.word() + " " + lastWord); } lastTag = taggedWord.tag(); lastWord = taggedWord.word(); } } In the above code, i have done only for NNP followed by NNP extraction, how can i generalise it so that i can add other rules too. I know that there are libraries available for doing this , but wanted to do this manually.

    Read the article

  • Twig templates, inheritances and block usage

    - by user846226
    I've created three templates using Twig. The first one has block A defined in it, the second one extends from the first one, but includes a third template which sets the content of block A. When loading, through the browser, the url which renders b.html.twig, the content in block A (defined by the 3th template) is not positioned block _A is defined. Example: <!-- base.html.twig --> {% block _css '' %} {% block _header '' %} {% block _content '' %} {% block _footer '' %} {% block _js '' %} <!-- layout.html.twig --> <!-- header and footer are placed in the raight zone --> {% extends ::base.html.twig %} {% block _header %} {% render "MyBundleBundle:Header:header" %} {% endblock %} {% block _footer %} {% render "MyBundleBundle:Footer:footer" %} {% endblock %} <!-- my_template.html.twig --> <!-- content is also placed in the right zone but css and js blocks in the included template are not placed where declared in base.html.twig --> {% extends MyBundleBundle::layout.html.twig %} {% block _content %} SOME_CONTENT {% include MyBundleBundle::my_included_template.html.twig %} {% endblock %} <!-- my_included_template.html.twig --> {% block _css %} <link.......................> {% endblock %} {% block _js %} <script..................> {% endblock %} MORE CONTENT BELONGING TO THE INCLUDED TEMPLATE What i expect here is, _css blocks content to appear on top of the page and _js block content at the bottom, but that's not happening. I hope you can see where i'm going wrong, thanks!

    Read the article

  • Wicket Drag and drop functionality for adding an image

    - by Marcel
    I'm making a wicket app that can manage some options for a cashdesk app. One of the options is to change the image of a selected Product. The user(manager) can choose from the already present images in the database (SQL) when this option is selected, or add a new image if the desired image is not present. Don't mention the test names and awesome images (it's still in test-fase) I prefer to see the adding of an image achieved by Drag and Drop html5 demo [dnd-upload] (From the desktop into the browser) I'm currently using Wicket-6.2.0 and wicket-dnd 0.5.0 and i can't seem to get this working! All examples I can find are from wicket 2.x or lower. It is possible to use drag and drop in Wicket-6.2, but how do I achieve this? There seems to be some DraggableBehavior in wicket? Any help is welcome! [UPDATE] Upgraded to wicket-dnd 0.6

    Read the article

  • NULL pointer dereference in swiotlb_unmap_sg_attrs() on disk IO

    - by Inductiveload
    I'm getting an error I really don't understand when reading or writing files using a PCIe block device driver. I seem to be hitting an issue in swiotlb_unmap_sg_attrs(), which appears to be doing a NULL dereference of the sg pointer, but I don't know where this is coming from, as the only scatterlist I use myself is allocated as part of the device info structure and persists as long as the driver does. There is a stacktrace to go with the problem. It tends to vary a bit in exact details, but it always crashes in swiotlb_unmap_sq_attrs(). I think it's likely I have a locking issue, as I am not sure how to handle the locks around the IO functions. The lock is already held when the request function is called, I release it before the IO functions themselves are called, as they need an (MSI) IRQ to complete. The IRQ handler updates a "status" value, which the IO function is waiting for. When the IO function returns, I then take the lock back up and return to request queue handling. The crash happens in blk_fetch_request() during the following: if (!__blk_end_request(req, res, bytes)){ printk(KERN_ERR "%s next request\n", DRIVER_NAME); req = blk_fetch_request(q); } else { printk(KERN_ERR "%s same request\n", DRIVER_NAME); } where bytes is updated by the request handler to be the total length of IO (summed length of each scatter-gather segment).

    Read the article

  • Confusion using XCode 4.5 for iOS 5.0 and iOS 6.0

    - by AppleDeveloper
    I am very much confused between iOS 5.0 and iOS 6.0 with XCode 4.5. It's not very clear if I want to support my new App on iOS 5.0 onwards, which functionality should I use and which are not to use. Basically Xcode 4.5 gives you all functionality like Container Views and Unwind Segues in storyboard (...and many more that I might not be aware) that are available only from iOS 6.0 and you wouldn't know until you run your app and it crashes! Could anyone please let me know any simple solution to this? Do I have to revert back to Xcode 4.4? I am setting deployment target to iOS 5.0 but I couldn't set Base SDK to iOS 5.0 as it doesn't appear in the list. See attached image. Thanks.

    Read the article

  • CRT not initialized

    - by jfhs
    I'm trying to compile one project with MSVC 2010, compilation is ok, but when I try to run the app, it gives me CRT not initialized error. It is a console application, so I tried to specify mainCRTStartup as Entry Point, but it didn't help. In the same solution there are other projects, and they don't have such a problem. The difference which I see between them is that one which is not working, uses boost. Boost v1.38.0 if this is important. Runtime Library is Multi-threaded DLL. Linker command line is: /OUT:"D:\temp\ghost\Release\ghost.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"..\zlib\lib" /LIBPATH:"..\mysql\lib\opt" /LIBPATH:"..\boost\lib" "ws2_32.lib" "winmm.lib" "zdll.lib" "StormLibRAS.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" "D:\temp\ghost\bncsutil\vc8_build\Release\BNCSutil.lib" /MANIFEST /ManifestFile:"Release\ghost.exe.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"D:\temp\ghost\Release\ghost.pdb" /SUBSYSTEM:CONSOLE /OPT:REF /OPT:ICF /PGD:"D:\temp\ghost\Release\ghost.pgd" /LTCG /TLBID:1 /ENTRY:"mainCRTStartup" /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:QUEUE

    Read the article

  • css layout for footer at bottom with dynamic ajax content changing height of page

    - by m42
    [Update] I actually compromised on this problem for now by foregoing the fixed footer design. It seems that there is no problem with dynamic content moving the footer and resizing containers appropriately unless the footer is fixed to the browser bottom initially. I hope others will eventually provide a great solution that encompasses the best of both worlds. I spent all day trying to get the footer to move down the page to accommodate dynamically added (via ajax) content. I really need some pointers or links because I haven't found anything that helps. Basically: My site has some pages that begin with only a text box and a button so that the total height of the content area is only a few inches beneath the header area. I don't have any problem getting the sticky footer working so that the footer appears at the bottom of the browser window even when there is very little content on screen. That same css layout works fine for other pages that have content that extends beneath the browser window. The catch: The content has to be rendered and passed to the browser with the initial load. The Problem: Any content that is added to the page via AJAX after the initial load paints down the page correctly -- but the footer remains in its initial location. Please tell me there is a fix for this. I can't post the css until checking with my boss first - if possible - and if needed, I will later - but it's just a very basic version of the many sticky footer css solutions floating around the web. Thanks.

    Read the article

  • FTP passive mode with limited port range?

    - by Phil Keeling
    I am running FileZilla FTP Server with passive mode enabled, and due to firewall constraints I have to limit the passive mode port range to only 6 ports. My question is how would FileZilla handle any situation where more than 6 concurrent FTP connections are active and want to passively upload a file. Would it queue the connections and prioritise them in a first in, first out manner? I'm not too familiar with FTP so any insight would be appreciated.

    Read the article

  • Which handsets work with IP DECT base?

    - by waldrumpus
    My workplace uses an Ascom IP DECT base station (IPBS1), and Ascom handsets as well. We're looking to replace some broken handsets; the ones by Ascom, however, are rather expensive, and we're not altogether satisfied with their quality. I've been looking at handsets from other manufacturers, which are much less expensive - however, since I don't know anything about DECT, VOIP, etc, I don't know if they will work with the base. I've perused the base's manual, but found nothing on handset compatibility. How can I find out what kind of handset works with our base?

    Read the article

  • Git push write access for deployment denied

    - by Stepchik
    I have strange issue when try git push. Git clone and commit works fine. W access for my_project DENIED to deploy_my_project_ My gitolite.conf repo my_project R = deploy_my_project_111 RW+ = my_name I wonder why git push takes wrong user (deploy_project_111) with read access. This error is float. Twice i had to change rsa key(rsa keys is unchangeble) and restart computer. May be my computer do something wrong.

    Read the article

  • Nginx and Tomcat 6 proxy pass

    - by Patrick Schneider
    i've got problems tp configure nginx as reverse proxy for an tomcat application. I want to set domain www.example.com/blog to pass to an tomcat application. nginx-site: server { listen 80; servername example.com; location /blog { proxy_pass http://localhost:8080/blog; proxy_redirect off; } } Now when i call on my browser http://example.com/blog it redirects to localhost/blog which does not work. curl http://localhost:8080/blog -H "host: example.com/blog" -v shows a 302 to localhost/blog Any ideas?

    Read the article

  • Running commands on FreeBSD Live CD

    - by jmc
    I'm running FreeBSD 9.1-PRERELEASE on a vps running on XEN virtualization, I tried to update it to 9.1-RELEASE but mergemaster toasted my /etc/master.passwd and /etc/passwd so what i have now is a blank copies of the two files. What i did is use a mounted Live CD and mount my root partition to /mnt and manually re listed every entry to /mnt/etc/master.passwd and /mnt/etc/passwd from another freebsd server. I believe that everytime you edit master.passwd and passwd you have to run pwd_mkdb but this gives me "Read Only File" error. What I plan to do is enable PermitRootLogin and PermitEmptyPassword first so I can login as root first before I redo necessary changes again. But i have to run pwd_mkdb, so is there a way to run this command from Live CD?

    Read the article

  • Protect foreach loop when empty list

    - by SteB
    Using Powershell v2.0 I want to delete any files older than X days: $backups = Get-ChildItem -Path $Backuppath | Where-Object {($_.lastwritetime -lt (Get-Date).addDays(-$DaysKeep)) -and (-not $_.PSIsContainer) -and ($_.Name -like "backup*")} foreach ($file in $backups) { Remove-Item $file.FullName; } However, when $backups is empty I get: Remove-Item : Cannot bind argument to parameter 'Path' because it is null. I've tried: Protecting the foreach with if (!$backups) Protecting the Remove-Item with if (Test-Path $file -PathType Leaf) Protecting the Remove-Item with if ([IO.File]::Exists($file.FullName) -ne $true) None of these seem to work, what if the recommended way of preventing a foreach loop from being entered if the list is empty?

    Read the article

  • mono 3.0.2 + xsp + lighttpd delivers empty page

    - by Nefal Warnets
    I needed MVC 4 (and basic .NET 4.5) support so I downloaded mono 3.0.2 and deployed it on an lighttpd 1.4.28 installation, together with xsp-2.10.2 (was the latest I could find). After going through the config tutorials I managed to get the fastcgi server to spawn, but all pages are served empty. even if I go to nonexistant urls or direct .aspx files I get an empty HTTP 200 response. The log file on Debug shows nothing suspicious. Here is the log: [2012-12-12 15:15:38Z] Debug Accepting an incoming connection. [2012-12-12 15:15:38Z] Debug Record received. (Type: BeginRequest, ID: 1, Length: 8) [2012-12-12 15:15:38Z] Debug Record received. (Type: Params, ID: 1, Length: 801) [2012-12-12 15:15:38Z] Debug Record received. (Type: Params, ID: 1, Length: 0) [2012-12-12 15:15:38Z] Debug Read parameter. (SERVER_SOFTWARE = lighttpd/1.4.28) [2012-12-12 15:15:38Z] Debug Read parameter. (SERVER_NAME = xxxx) [2012-12-12 15:15:38Z] Debug Read parameter. (GATEWAY_INTERFACE = CGI/1.1) [2012-12-12 15:15:38Z] Debug Read parameter. (SERVER_PORT = 80) [2012-12-12 15:15:38Z] Debug Read parameter. (SERVER_ADDR = xxxx) [2012-12-12 15:15:38Z] Debug Read parameter. (REMOTE_PORT = xxx) [2012-12-12 15:15:38Z] Debug Read parameter. (REMOTE_ADDR = xxxx) [2012-12-12 15:15:38Z] Debug Read parameter. (SCRIPT_NAME = /ViewPage1.aspx) [2012-12-12 15:15:38Z] Debug Read parameter. (PATH_INFO = ) [2012-12-12 15:15:38Z] Debug Read parameter. (SCRIPT_FILENAME = /data/htdocs/ViewPage1.aspx) [2012-12-12 15:15:38Z] Debug Read parameter. (DOCUMENT_ROOT = /data/htdocs) [2012-12-12 15:15:38Z] Debug Read parameter. (REQUEST_URI = /ViewPage1.aspx) [2012-12-12 15:15:38Z] Debug Read parameter. (QUERY_STRING = ) [2012-12-12 15:15:38Z] Debug Read parameter. (REQUEST_METHOD = GET) [2012-12-12 15:15:38Z] Debug Read parameter. (REDIRECT_STATUS = 200) [2012-12-12 15:15:38Z] Debug Read parameter. (SERVER_PROTOCOL = HTTP/1.1) [2012-12-12 15:15:38Z] Debug Read parameter. (HTTP_HOST = xxxxx) [2012-12-12 15:15:38Z] Debug Read parameter. (HTTP_CONNECTION = keep-alive) [2012-12-12 15:15:38Z] Debug Read parameter. (HTTP_CACHE_CONTROL = max-age=0) [2012-12-12 15:15:38Z] Debug Read parameter. (HTTP_USER_AGENT = Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11) [2012-12-12 15:15:38Z] Debug Read parameter. (HTTP_ACCEPT = text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8) [2012-12-12 15:15:38Z] Debug Read parameter. (HTTP_ACCEPT_ENCODING = gzip,deflate,sdch) [2012-12-12 15:15:38Z] Debug Read parameter. (HTTP_ACCEPT_LANGUAGE = en-US,en;q=0.8) [2012-12-12 15:15:38Z] Debug Read parameter. (HTTP_ACCEPT_CHARSET = ISO-8859-1,utf-8;q=0.7,*;q=0.3) [2012-12-12 15:15:38Z] Debug Record received. (Type: StandardInput, ID: 1, Length: 0) [2012-12-12 15:15:38Z] Debug Record sent. (Type: EndRequest, ID: 1, Length: 8) lighttpd config: server.modules += ( "mod_fastcgi" ) include "conf.d/mono.conf" $HTTP["host"] !~ "^vdn\." { $HTTP["url"] !~ "\.(jpg|gif|png|js|css|swf|ico|jpeg|mp4|flv|zip|7z|rar|psd|pdf|html|htm)$" { fastcgi.server += ( "" => (( "socket" => mono_shared_dir + "fastcgi-mono-server", "bin-path" => mono_fastcgi_server, "bin-environment" => ( "PATH" => mono_dir + "bin:/bin:/usr/bin:", "LD_LIBRARY_PATH" => mono_dir + "lib:", "MONO_SHARED_DIR" => mono_shared_dir, "MONO_FCGI_LOGLEVELS" => "Debug", "MONO_FCGI_LOGFILE" => mono_shared_dir + "fastcgi.log", "MONO_FCGI_ROOT" => mono_fcgi_root, "MONO_FCGI_APPLICATIONS" => mono_fcgi_applications ), "max-procs" => 1, "check-local" => "disable" )) ) } } the referenced mono.conf index-file.names += ( "index.aspx", "default.aspx" ) var.mono_dir = "/usr/" var.mono_shared_dir = "/tmp/" var.mono_fastcgi_server = mono_dir + "bin/" + "fastcgi-mono-server4" var.mono_fcgi_root = server.document-root var.mono_fcgi_applications = "/:." The document root for this server is /data/htdocs. The asp.net files reside there. lighttpd error logs show nothing. Every help is greatly appreciated!

    Read the article

  • <solved> MySQL Replication A->B->C

    - by nonus25
    I was setting the MySQL Replication for master - slave/master - slave and Replication for master - slave its works fine but when i have enable this option in my.cnf log-slave-updates=1 for updating the master bin log my replications is starting be slower and the time Seconds_Behind_Master is growing. I use innodb engine but the DB is big. Any idea how i can improve the replication, looks like the network is not the issue. Also i was think to use binlog_format=ROW but master is using default setting for replication 'statement' and i cant reset master ;) Thanks ...

    Read the article

  • lighttpd on Fedora permission issues

    - by Isaac Gateno
    I'm trying to get started with lighttpd on Fedora 16 to run a RESTful api for development. Right now even with the most basic sample config file I'm getting 404 pages when I know the pages I'm pointing at exist. From reading other questions I'm leaning towards this being a permissions issue, but I'm confused about how lighttpd runs on Fedora. There's a user called "lighttpd" not "www-data"? I can't see this user in the system-config-users tool and I can't su into it to check which permissions it has. I'm trying to point lighttpd to "/var/www/lighttpd" which has some example pages in it. The permissions for the files inside are set to -rw-r--r-- and the permissions for the folder containing them are drwxr-xr-x. Doesn't that mean that any user can view these files? I'm not sure what else I should be checking as I don't have much experience with server configuration. Any help would be appreciated. Edit: I was following the tutorial configuration here so the lighttpd.conf file contains server.document-root = "/var/www/lighttpd/" server.port = 3000 mimetype.assign = ( ".html" => "text/html", ".txt" => "text/plain", ".jpg" => "image/jpeg", ".png" => "image/png" ) and I was just trying to get the basic example page working.

    Read the article

  • Fix mail that has been put in deferred folder

    - by Safado
    So we have a little more than usual deferred mail on our Postfix server, so I started to look through the messages to make sure we weren't hacked and sending out spam. Everything is fine and it turns out that a bot had filled out our Request Info form multiple times with bad info. However, I did find one that was a legitimate request for more information about our company and I noticed that it isn't sending because they fat-fingered the address with gmal.com. Is there a way I can correct that and have Postfix send it out? This is on a CentOS server.

    Read the article

  • How to setup Python with Lighttpd and FastCGI (like PHP)

    - by johndir
    Running Lighttpd on Linux, I would like to be able to execute Python scripts just the way I execute PHP scripts. The goal is to be able to execute arbitrary script files stored in the WWW directory, e.g. http://www.example.com/*.py. I would not like to spawn a new Python instance (interpreter) for every request (like done in regular CGI, if I'm not mistaken), which is why I'm using FastCGI. Following Lighttpd's documentation, the following is the FastCGI part of my config file. The problem is that it always runs the /usr/local/bin/python-fcgi script for every *.py file, regardless of the content of that file: http://www.example.com/script.py [output=>] "python-fcgi: test" (regardless of the content of script.py) I'm not interested in using any framework, but simply executing individual [web] scripts. How can I make it act like PHP, executing any script in the WWW directory by requesting it's path? /etc/lighttpd/conf.d/fastcgi.conf: server.modules += ( "mod_fastcgi" ) index-file.names += ( "index.php" ) fastcgi.server = ( ".php" => ( "localhost" => ( "bin-path" => "/usr/bin/php-cgi", "socket" => "/var/run/lighttpd/php-fastcgi.sock", "max-procs" => 4, # default value "bin-environment" => ( "PHP_FCGI_CHILDREN" => "1", # default value ), "broken-scriptfilename" => "enable" ) ), ".py" => ( "python-fcgi" => ( "socket" => "/var/run/lighttpd/fastcgi.python.socket", "bin-path" => "/usr/local/bin/python-fcgi", "check-local" => "disable", "max-procs" => 1, ) ) ) /usr/local/bin/python-fcgi: #!/usr/bin/python2 def myapp(environ, start_response): start_response('200 OK', [('Content-Type', 'text/plain')]) return ['python-fcgi: test\n'] if __name__ == '__main__': from flup.server.fcgi import WSGIServer WSGIServer(myapp).run()

    Read the article

  • How do you passthrough native SATA drives to a guest on ESXi?

    - by John
    I have ESXi 4.0 running on an Intel DX58S0 Mothboardboard with an Intel Core i7 930 processor. VT-d is also enabled. I have three drives in the system, drive 0 is used for ESXi. Drive 1 and 2 contain data from an older machine and show up under the "Storage Adapters" section in configuration. I would like to allow a guest machine to access the data on these drives (as nativly as possible). I have enabled passthrough of the motherboard's built in SATA controller (Intel/Marvell 88SE6121 ). This controller shows up in my guest OS, but the guest shows no drives aside from the normal virtual drive. I have tried a Linux guest and Windows7. I have also configured the host machine to try IDE/RAID/ACHI modes for the SATA controller. Any ideas how I can configure one of my guests to get at the raw data on these drives?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >