Search Results

Search found 194 results on 8 pages for 'leo alekseyev'.

Page 3/8 | < Previous Page | 1 2 3 4 5 6 7 8  | Next Page >

  • 0 not a valid FILE* when provided as a template argument

    - by Seva Alekseyev
    The following code #include <stdio.h> template <typename T, T v> class Tem { T t; Tem() { t = v; } }; typedef Tem<FILE*,NULL> TemFile; when compiled in a .mm file (Objective C++) by Xcode on MacOS X, throws the following error: error: could not convert template argument '0' to 'FILE*'. What's going on, please? The code in question compiled fine under MSVC. Since when is the 0 constant not a valid pointer to anything? Is this an artifact of Objective C++ (as opposed to vanilla C++)?

    Read the article

  • Emacs under Windows and PNG files

    - by Leo Alekseyev
    Would anyone have any pointers on getting PNG images to display in Emacs 23 under Win32?.. I have installed the gnuwin32 set of utilities, including libpng and zlib; C:\Program Files\GnuWin32\bin is in path. JPG files started working but not PNGs. I'd appreciate any hints on getting this to work.

    Read the article

  • iPhone filesystem POSIX-compliant?

    - by Seva Alekseyev
    Hi all, I'm trying to pass some files from one app to another. I communicate the path (via a custom URL). The target application cannot read the file, citing errno 13 (permission denied). I've checked the permissions on file - they're 0644 (O+R), the permissions on directories all the way up to the root are 755 (O+RX). From a POSIX perspective, the file should be readable to any process and any user. Yet it's not. Any ideas, please? I can think of some workarounds. I could use a Web service (upload, get a cookie, communicate the cookie to the other app, other app downloads). I could also pass the actual file data in the URL - unelegant, and probably subject to length limitations. Clipboard is not supported on iPhone OS 2 IIRC.

    Read the article

  • 2-byte (UCS-2) wide strings under GCC

    - by Seva Alekseyev
    Hi all, when porting my Visual C++ project to GCC, I found out that the wchar_t datatype is 4-byte UTF-32 by default. I could override that with a compiler option, but then the whole wcs* (wcslen, wcscmp, etc.) part of RTL is rendered unusable, since it assumes 4-byte wide strings. For now, I've reimplemented 5-6 of these functions from scratch and #defined my implementations in. But is there a more elegant option - say, a build of GCC RTL with 2-byte wchar-t quietly sitting somewhere, waiting to be linked? The specific flavors of GCC I'm after are Xcode on Mac OS X, Cygwin, and the one that comes with Debian Linux Etch.

    Read the article

  • BlackBerry project version number

    - by Seva Alekseyev
    I have a BlackBerry Java project in Eclipse. It has version number written down in four different spots: in the project properties, under "BlackBerry Project Settings/General" in the JAD file, under MIDlet-1 in the JAD file, under MIDlet-Version in the ALX file, under <version> And they seem uncorrelated. Changing either of these affects none of the rest. The third one is what the users sees during over-the-air setup and under Options/Advanced. Questions - why do we need all these? Are there contexts where numbers 1, 2, 4 come up? It's my understanding that the ALX is generated during compilation - where does the version # come from? Is there a way to learn at least one of those programmatically (without signing the app)?

    Read the article

  • Convert a Dynamic[] construct to a numerical list

    - by Leo Alekseyev
    I have been trying to put together something that allows me to extract points from a ListPlot in order to use them in further computations. My current approach is to select points with a Locator[]. This works fine for displaying points, but I cannot figure out how to extract numerical values from a construct with head Dynamic[]. Below is a self-contained example. By dragging the gray locator, you should be able to select points (indicated by the pink locator and stored in q, a list of two elements). This is the second line below the plot. Now I would like to pass q[[2]] to a function, or perhaps simply display it. However, Mathematica treats q as a single entity with head Dynamic, and thus taking the second part is impossible (hence the error message). Can anyone shed light on how to convert q into a regular list? EuclideanDistanceMod[p1_List, p2_List, fac_: {1, 1}] /; Length[p1] == Length[p2] := Plus @@ (fac.MapThread[Abs[#1 - #2]^2 &, {p1, p2}]) // Sqrt; test1 = {{1.`, 6.340196001221532`}, {1.`, 13.78779876355869`}, {1.045`, 6.2634018978377295`}, {1.045`, 13.754947081416544`}, {1.09`, 6.178367702583522`}, {1.09`, 13.72055251752498`}, {1.135`, 1.8183153704413153`}, {1.135`, 6.082497198000075`}, {1.135`, 13.684582525399742`}, {1.18`, 1.6809452373465104`}, {1.18`, 5.971583107298081`}, {1.18`, 13.646996905469383`}, {1.225`, 1.9480537697339537`}, {1.225`, 5.838386922625636`}, {1.225`, 13.607746407088161`}, {1.27`, 2.1183174369679234`}, {1.27`, 5.669799095595362`}, {1.27`, 13.566771130126131`}, {1.315`, 2.2572975468163463`}, {1.315`, 5.444014254828522`}, {1.315`, 13.523998701347882`}, {1.36`, 2.380307009155079`}, {1.36`, 5.153024664297602`}, {1.36`, 13.479342200528283`}, {1.405`, 2.4941312539733285`}, {1.405`, 4.861423833512566`}, {1.405`, 13.432697814928654`}, {1.45`, 2.6028066447609426`}, {1.45`, 4.619367407525507`}, {1.45`, 13.383942212133244`}}; DynamicModule[{p = {1.2, 10}, q = {1.3, 11}}, q := Dynamic@ First@test1[[ Ordering[{#, EuclideanDistanceMod[p, #, {1, .1}]} & /@ test1, 1, #1[[2]] < #2[[2]] &]]]; Grid[{{Show[{ListPlot[test1, Frame -> True, ImageSize -> 300], Graphics@Locator[Dynamic[p]], Graphics@ Locator[q, Appearance -> {Small}, Background -> Pink]}]}, {Dynamic@p}, {q},{q[[2]]}}]]

    Read the article

  • iPhone: no way to draw on screen outside drawRect?

    - by Seva Alekseyev
    Is there a way to draw on the iPhone screen (on a UIView in a UIWindow) outside of that view's drawRect() method? If so, how do I obtain the graphics context? The graphics guide mentions class NSGraphicsContext, but the relevant chapter seems like a blind copy/paste from Mac OS X docs, and there's no such class in iPhone SDK.

    Read the article

  • In DirectShow, what determines the graph source?

    - by Seva Alekseyev
    Hi all, I have two machines - A (XP SP2) and B (Win7). Machine B has trouble playing OGM files - enabling subtitles causes a crash in the player. Investigation shows that the DirectShow graphs are quite different. On A, the source is a file source, which produces a stream of subtype OGG, which goes into "Ogg Splitter". On B, the source is an instance of Haali Media Splitter, which produces video, audio, and subtitles as separate streams. Machine A has Haali splitter installed as well, but it is not invoked somehow. Question - what determines the source filter? Is there a file type to preferred source mapping, or does the system load and ask all suitable filters if they would take this file? On machine A, the merit of Haali splitter is higher than that of File source, so it's probably not about relative merits.

    Read the article

  • Prevent coersion to a single type in unlist() or c(); passing arguments to wrapper functions

    - by Leo Alekseyev
    Is there a simple way to flatten a list while retaining the original types of list constituents?.. Is there a way to programmatically construct a heterogeneous list?.. For instance, I want to create a simple wrapper for functions like png(filename,width,height) that would take device name, file name, and a list of options. The naive approach would be something like my.wrapper <- function(dev,name,opts) { do.call(dev,c(filename=name,opts)) } or similar code with unlist(list(...)). This doesn't work because opts gets coerced to character, and the resulting call is e.g. png(filename,width="500",height="500"). If there's no straightforward way to create heterogeneous lists like that, is there a standard idiomatic way to splice arguments into functions without naming them explicitly (e.g. do.call(dev,list(filename=name,width=opts["width"]))? -- Edit -- Gavin Simpson answered both questions below in his discussion about constructing wrapper functions. Let me give a summary of the answer to the title question: It is possible to construct a heterogeneous list with c() provided the arguments to c() are lists. To wit: > foo <- c("a","b"); bar <- 1:3 > c(foo,bar) [1] "a" "b" "1" "2" "3" > c(list(foo),list(bar)) [[1]] [1] "a" "b" [[2]] [1] 1 2 3 > c(as.list(foo),as.list(bar)) ## this creates a flattened heterogeneous list [[1]] [1] "a" [[2]] [1] "b" [[3]] [1] 1 [[4]] [1] 2 [[5]] [1] 3

    Read the article

  • Is it possible to scroll in isearch mode?

    - by Leo Alekseyev
    Is there a way to scroll through a document without exiting isearch mode? I have isearch-allow-scroll set to t, but that limits my scroll range to make sure the current isearch match is visible in the buffer. Ideally, I would like to be able to scroll with the mousewheel, having all the isearch matches highlighted as I scroll. I am aware of M-x occur, but a lot of the time simply being able to scroll in isearch mode would be more efficient (in addition, M-x occur does not play well with folding mode).

    Read the article

  • PHP-FPM bind issues

    - by Leo
    I have a setup of a mac server running Nginx 1.2.3, PHP-FPM 5.3.10 on OSX Lion. It works fine with Nginx on port 8080 ( using port fordwaring on from 80 ) and PHP-FPM listening on 9000. Both are running as /System/LaunchDaemons. My issue is that the system log is full of these errors ( every ten seconds ) which despite the fact the system works I don't like. Sep 10 19:59:05 mac-server php-fpm[974]: [10-Sep-2012 19:59:05] ERROR: unable to bind listening socket for address '127.0.0.1:9000': Address already in use (48) Sep 10 19:59:05 mac-server php-fpm[974]: [10-Sep-2012 19:59:05] ERROR: FPM initialization failed Sep 10 19:59:05 mac-server com.apple.launchd[1] (php-fpm): Throttling respawn: Will start in 10 seconds I have pretty much an out of the box php-fpm config. Could someone please point me to what configuration variables may be causing this problem. There are not any errorneous LaunchAgent/LaunchDaemons floating around either?

    Read the article

  • PHP-APC Installation

    - by Leo
    Trying to get my head around the way to install APC cache on PHP 5.3.13. That's a VPS with apache, configured preferably through whm/cpanel (although not only). I read a bunch of articles where it was suggested to use FastCGI with APC, as suPHP doens't do well with opcode caching, and fcgid_module doesn't do it right for APC either. Noted that fcgid_module is a newer package than FastCGI and that's what whm/cpanel installs for you but ok, that can be solved I guess. Then I'm reading that php-fpm is a much better alternative to manage the php processes, especially for APC. Ok. Then I realised that php-fpm is included in php core since 5.3 and got confused. Does that mean I don't have to use FastCGI/fcgid_module (and what should I use instead of them - mod_php or cgi?)? Or does that mean that I still need to get the older FastCGI module, and configure it to use one process per user (or just one process?)? Or would fcgid_module work as well? And how bad would it be just to go with mod_php/APC to avoid troubles of installing php-fpm and FastCGI (whm/cpanel doesn't support neither) given than Varnish would serve most of the static content anyway - no php process need to be created for static content. Any examples of their FastCGI/fcgid_module/php-fpm/APC configurations would be greatly appreciated as well.

    Read the article

  • OSX: Selecting default application for all unknown and different file types (extensions)

    - by Leo
    I work in cluster computing and am using Mac OS X 10.6. I send off hundreds of computing jobs a day, and each one comes back with with a different extension. For example, svmGeneSelect.o12345 which is the std output of my svmGeneSelect job which is job number 12345. I don't control the extensions. All files are plain text. I want OSX to open any file extension that it hasn't seen before with my favorite text editor when I click on it. Or even better set up file association defaults for extension patterns ie textEdit for extensions matching *.o*. I do NOT want to create file associations for individual files since this extension will only ever exist once, and I do not want to go through the process of selecting the application to use for each file. Thanks for any help you can offer.

    Read the article

  • Can't deploy an ejb bean on jboss

    - by leo
    I am try to deploy a jar to an jboss server. It works on my environment. But when I deployed the same jar on another server, i kept getting an error saying that the persistence unit is already registered. There is no other bean using the same name and the same persistence unit name. I tried to restart the server and remove the tmp, work, data directory but still get the same error. here is my error: ObjectName: jboss.j2ee:service=EJB3,module=wess_jpa.jar State: FAILED Reason: java.lang.RuntimeException: javax.management.InstanceAlreadyExistsException: persistence.units:unitName=dses_wess already registered. This is almost identical to this issue in jboss forum but there is no solution: http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211687#4211687

    Read the article

  • Enabling mod_rewrite on Amazon Linux

    - by L. De Leo
    I'm trying to enable mod_rewrite on an Amazon Linux instance. My Directory directives look like this: <Directory /> Order deny,allow Allow from all Options None AllowOverride None </Directory> <Directory "/var/www/vhosts"> Order allow,deny Allow from all Options None AllowOverride All </Directory> And then further down in httpd.conf I have the LoadModule directive: ... other modules... #LoadModule substitute_module modules/mod_substitute.so LoadModule rewrite_module modules/mod_rewrite.so #LoadModule proxy_module modules/mod_proxy.so ... other modules... I have commented out all the Apache modules not needed by Wordpress. Still when I issue http restart and then check the loaded modules with /usr/sbin/httpd -l I get only: [root@foobar]# /usr/sbin/httpd -l Compiled in modules: core.c prefork.c http_core.c mod_so.c Inside the virtual host containing the Wordpress site I have an .htaccess containing: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress The .htaccess is owned by apache which is the user apache runs under. The apachectl -t command returns Syntax OK What am I doing wrong? What should I check?

    Read the article

  • Stuttery 1080p playback on decent system

    - by Leo
    We have a media center system that was recently built. It works well for all types of content, however it has issues with 1080p content. 720p plays fine. I have tried VLC, ffdshow and finally, CoreAVC. CoreAVC plays the best however it still eventually loses sync due to stutter - this does not happen on other systems with the same file. Specs: Asrock 4core-2dual sata PCI Express ATI 2400 HD 1.5GB DDR 2100 Intel Pentium E5300 120GB Maxtor Diamondmax PATA Any ideas?

    Read the article

  • Linux only recognizes 800Mhz from 2Ghz

    - by Leo
    I tried with Suse 11 (KDE), Xubuntu 11.10 and Lubuntu 11.10 and these systems only recognizes 800Mhz from my processor of 2Ghz! The utilities I used are: linuxinfo, sysinfo, "system profiler and benchmark". And all of this only shows 800Mhz My system specs are: AMD Turion 64 Mobile MK36 512 RAM nVidia Geforce Go 6150 (I also tried with nVidia restricted drivers) 120GB Hard drive The weirdest thing is that Windows XP and 7 recognize the 2Ghz of my processor, What can I do? p.s. (It is not just the value of 800Mhz, I also feel my system very slow with linux)

    Read the article

  • Checkinstall failed with /root/rpmbuild has no source directory

    - by leo
    I am trying to use checkinstall to build a package from source code. However, when i run checkinstall , it ask : /root/rpmbuild has no source directory, please write the path to the rpm source directory tree. i am running on fedora 12 and system was installed through kickstart via repository of dvd of fc12. I was not aware of the rpm source directory during the installation. so how can i check whether rpm source has been installed or not. if not, how to make the rpm source directory so that i can please the checkinstall and build the package successfully. or can i bypass it? thanks a lot

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8  | Next Page >