Search Results

Search found 1855 results on 75 pages for 'weak linking'.

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

  • Windows API calls from assembly while minimizing program size

    - by takteek
    I'm trying to write a program in assembly and make the resulting executable as small as possible. Some of what I'm doing requires windows API calls to functions such as WriteProcessMemory. I've had some success with calling these functions, but after compiling and linking, my program comes out in the range of 14-15 KB. (From a source of less than 1 KB) I was hoping for much, much less than that. I'm very new to doing low level things like this so I don't really know what would need to be done to make the program smaller. I understand that the exe format itself takes up quite a bit of space. Can anything be done to minimize that? I should mention that I'm using NASM and GCC but I can easily change if that would help.

    Read the article

  • Rails address and routes?

    - by Danny McClelland
    Hi Everyone, I have created a custom action within one of my controlers as follows: # GET /kases/discharge/1 # GET /kases/discharge/1.xml def discharge @kase = Kase.find_by_jobno(params[:id]) respond_to do |format| format.html { } # discharge.html.erb format.xml { render :xml => @kase } format.pdf { render :layout => false } prawnto :prawn => { :background => "#{RAILS_ROOT}/public/images/discharge.png", :left_margin => 0, :right_margin => 0, :top_margin => 0, :bottom_margin => 0, :page_size => 'A4' } end end For the edit actions etc the link would be link_to edit_kase_path(@kase) Is there a way of linking to the discharge action already, or do I have to make a custom route? Thanks, Danny

    Read the article

  • Shipping GNU/Linux Firefox plugin with shared libraries (for installation with no root access)

    - by Vi
    The application is a Firefox plugin (loaded from $HOME/.mozilla/plugins), so wrapper script that sets LD_LIBRARY_PATH is not an easy option. RPATH, as far as I know, cannot refer to $HOME and can be only absolue path. Firefox tries to dlopen it's plugin from ~/.mozilla/plugins but fails (because it depends on shared libraries installed somewhere in the user home directory). Modifying Firefox menu item to provide a wrapper (with LD_LIBRARY_PATH) around Firefox is too hacky. What should installer script do (without root access) to make standard firefox load plug-ins that depends on out shared library? Should I just try to make embed everything into that .so to remove dependencies? Should I try to make installer script to finish linking or patch RPATH during the installation phase?

    Read the article

  • Initialize a static member ( an array) in C++

    - by Jimmy zhang
    I intended to create a class which only have static members and static functions. One of the member variable is an array. Would it be possible to initialize it without using constructors? I am having lots of linking errors right now... Class A{ public: static char a[128]; static void do_something(); } How would you initialize a[128]? Why can't I initialize a[128] by directly specifying its value like in C? a[128={1,2,3,...};

    Read the article

  • Mixed static and dynamic link on Mac OS

    - by barbaz
    I want to use gcc to produce a shared library, but i want to link some other libraries it depends on statically. Now to produce the "standard" dynamically linked output file i use gcc -dynamiclib *.o -lfoo -lbar -o outfile which would be gcc -shared *.o -lfoo -lbar -o outfile on for a binutils ld on a linux system. Now if i want libfoo and libbar to be linked statically, I can name the static libraries directly gcc -dynamiclib *.o /usr/lib/libfoo.a /usr/lib/libbar.a -o outfile however, that way i have to look for the library files myself. GNU binutils ld supports this: gcc -shared *.o -l:libfoo.a -l:libbar.a -o outfile but apple's ld doesnt. Is there a way to make apple's ld look for the static libraries himself? If not, is there another way that would avoid naming the exact location of the archives, e.g. producing an intermediate output file out of the object files requiring libfoo and libbar with the -static switch and linking that file together with the remaining objectfiles to create the dynamic object?

    Read the article

  • PHP Extension using libtidy compiles, but does not load

    - by ewokker
    I wrote an extension in C++ that uses libtidy, and it runs perfectly under PHP when I compile PHP --with-tidy. However, it would be nice to have the extension run on a vanilla PHP. When I try to use the extension, I get something like: PHP Warning: PHP Startup: Unable to load dynamic library 'extension.so': undefined symbol: tidyCleanAndRepair in Unknown on line 0 and the extension is not loaded. Obviously, the official tidy extension works fine. I have the relevant libtidy development packages installed on the system, and it compiles+links without a problem. I have tried to look through the code for the tidy extension, but it is a huge mass of macros - copying pieces at random felt like cargo code. Besides linking to the library with PHP_ADD_LIBRARY_WITH_PATH(tidy, $TIDY_LIBDIR, TIDY_SHARED_LIBADD), Is there a PHP extension or C statement that fixes this error? Thanks in advance!!

    Read the article

  • Using Fortran to call C++ Functions

    - by Dane Larsen
    I'm trying to get some FORTRAN code to call a couple c++ functions that I wrote (c_tabs_ being one of them). Linking and everything works just fine, as long as I'm calling functions that don't belong to a class. My problem is that the functions I want the FORTRAN code to call belong to a class. I looked at the symbol table using nm and the function name is something ugly like this: 00000000 T _ZN9Interface7c_tabs_Ev FORTRAN won't allow me to call a function by that name, because of the underscore at the beginning, so I'm at a loss. The symbol for c_tabs when it's not in a class is quite simple, and FORTRAN has no problems with it: 00000030 T c_tabs_ Any suggestions? Thanks in advance.

    Read the article

  • How to merge/crosslink Javadoc?

    - by Tom Wheeler
    If you have the standard Javadoc for a few different projects, how can you process them to create a single unified set of documentation in which everything is cross-linked? Ideally, the result would be similar to the documentation for the various modules in the NetBeans Platform: http://bits.netbeans.org/dev/javadoc/index.html but I've looked at their build scripts and they're predicated on you building everything from source. I'm looking for something which could also handle linking in Javadoc for third-party libraries, so I'd imagine it would need to be a post-processing operation. I can't be the first person to ever want this. Any ideas?

    Read the article

  • Calling DLL functions from VB6.

    - by Tim Ring
    I've got a Windows DLL that I wrote, written in C/C++ (all exported functions are 'C'). The DLL works fine for me in VC++. I've given the DLL to another company who do all their development in VB. They seem to be having a problem linking to the functions. I haven't used VB in ten years and I don't even have it installed. What could be the problem? I've declared all my public functions as follows: define MYDCC_API __declspec(dllexport) MYDCCL_API unsigned long MYDCC_GetVer( void); . . . Any ideas? Finally got back to this today and have it working. The answers put me on the right track but I found this most helpful: http://www.codeproject.com/KB/DLL/XDllPt2.aspx Also, I had a few problems passing strings to the DLL functions, I found this helpful: http://www.flipcode.com/archives/Interfacing_Visual_Basic_And_C.shtml

    Read the article

  • Running Java plugin 1.5 on Firefox + Snow Leopard

    - by Sam
    I have a Java applet that needs to be able to run on Java 1.5. I have successfully installed Java 1.5 on Snow Leopard and I am able to use it to run applets in Safari by changing the order of the versions in Java Preferences. However, Firefox (3.5.9) doesn't seem to be able to pick up the changes and keeps reverting to using the Java 1.6 plugin. How do I force Firefox to use the Java 1.5 plugin? I tried re-linking the /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK folder to point to my 1.5 directory, but that seems to change the system-level Java runtime, not the Firefox plugin (it opened up the console differently, but inside the console it reported Java plugin 1.6.0).

    Read the article

  • C / JSON Library in popular Linux distros?

    - by Tim Post
    I have a program written in C that has to input and output JSON over a local domain socket. I've found several C / JSON libraries that 'almost work' through searches. Prior to taking one of the libraries that I found .. I want to be sure that I'm not over-looking a library that is commonly found on modern Linux distros. I'd also really appreciate links to libraries that you use. Most likely, I'll just drop it in tree, unless I realize that I've over looked something widely distributed. I am tagging this as subjective because the answer that I select is the one linking to a library that works for me, that does not mean its the 'best' library. I want to take an existing array and easily convert it to a buffer that can be sent, or take a buffer and easily convert it into an allocated array. Thanks in advance!

    Read the article

  • Posting Documentation onto a Joomla Site

    - by Chris Spicer
    I would like to create some documentation and post it onto my Joomla website. This documentation would be something along the lines of the MSDN documentation: i.e. each page would follow a basic template. Intuitively I feel I have two ways of achieving this: 1) Creating each page of documentation as a separate article, and then linking them up. 2) Creating some kind of template and filling the information from a database. The second option being preferable in the long run. Unforunately I have no idea how to achieve what I'm looking for. I hoped that there would be a component out there that woud help me, but Googling for 'Joomla Documentation' just brings up the documentation for Joomla itself. Has anyone out there put documentation on their site, and how did they achieve it?

    Read the article

  • Using entity framework to detect changes in related table and action appropriate inserts and deletes

    - by Kohan
    Lets say i have a Person table, a Role table with a trel table PersonRoles linking them as many to many. I create a new person and assign them to 2 roles (role 1, role 3). I then want to edit this person; so i retrieve their data and bind their roles to a checkboxes. I change the values (Deselect role 1 and select role 2 instead) I then post this data back through a viewmodel. Can i then get Entity Framework to update these roles for me, as in delete the entry in PersonRoles to role 1 and then add a new entry as role 2? Or do i have to do the logic for this myself? Cheers, Kohan

    Read the article

  • IPP linker errors on cygwin

    - by Jason Sundram
    I've built a program that uses mkl and ipp that runs on mac and linux. I'm now building that program for Windows using cygwin and gcc, and can't get it to link. The errors I'm getting are: Warning: .drectve -defaultlib:"uuid.lib" ' unrecognized ../../../bin/libMath.a(VectorUtility.cxx.o):VectorUtility.cxx:(.text+0x95): undefined reference to _ippGetLibVersion' ../../../bin/libMath.a(VectorUtility.cxx.o):VectorUtility.cxx:(.text+0x157): undefined reference to `_ippsWinHann_32f_I' (and many more like that). I'm using link path: /opt/intel/IPP/6.1.2.041/ia32/lib and linking to the following: ippiemerged, ippimerged, ippmemerged, ippmmerged, ippsemerged, ippsmerged and ippcorel. Can someone point me to what I'm doing wrong?

    Read the article

  • buffer overflow with boost::program_options

    - by f4
    Hello, I have a problem using boost:program_options this simple program, copy-pasted from boosts' documentation : #include <boost/program_options.hpp> int main( int argc, char** argv ) { namespace po = boost::program_options; po::options_description desc("Allowed options"); desc.add_options() ("help", "produce help message") ("compression", po::value<int>(), "set compression level") ; return 0; } fails with a buffer overflow. I have activated the "buffer security switch", and when I run it I get an "unknown exception (0xc0000409)" when I step over the line desc.add_options()... I use Visual Studio 2005 and boost 1.43.0. By the way it does run if I deactivate the switch but I don't feel comfortable doing so... unless it's possible to deactivate it locally. So do you have a solution to this problem? EDIT I found the problem I was linking against libboost_program_options-vc80-mt.lib which wasn't the good library.

    Read the article

  • How to make columns as wide as the widest entry?

    - by Helper Method
    For a gcc cheatsheet I'm writing, I want to create a table which should describe how gcc interprets different file endings. The table I created so far is defined as follows: |====================================================================== |.c |C source code which must be preprocessed. |.i |C source code which should not be preprocessed. |.h |C header file to be turned into a precompiled header. |.s |Assembler code. |other | An object file to be fed straight into linking. Any file name with no recognized suffix is treated this way. |====================================================================== The problem I have is that the table spans the total page width, but what I want is that each column only is as wide as it's widest entry, and that the table will span only as much witdh as it needs.

    Read the article

  • NHibernate and Composite Key References

    - by Rich
    I have a weird situation. I have three entities, Company, Employee, Plan and Participation (in retirement plan). Company PK: Company ID Plan PK: Company ID, Plan ID Employee PK: Company ID, SSN, Employee ID Participation PK: Company ID, SSN, Plan ID The problem is in linking the employee to the participation. From a DB perspective, participation should have Employee ID in the PK (it's not even in table). But it doesn't. NHibernate won't let me map the "has many" because the link expects 3 columns (since Employee PK has 3 columns), but I'd only provide 2. Any ideas on how to do this?

    Read the article

  • Add links to specific words within span tag in PHP

    - by dazhall
    I have a list of words that I'd like to add a link to, I can do this fairly easily using preg_match_all and preg_replace: $str = "<span class=\"cz\">Dám si jedno pivo prosím.</span> = I'll have a beer please."; preg_match_all('/[a-ztúuýžácdéeínórš]+/i',$str,$matches); $matches = array_unique($matches[0]); foreach ($matches as $match) { if(!empty($words[$match])) { $str = preg_replace("/(^|[^\w]){1}(".preg_quote($match,"/").")($|[^\w]){1}/i", '\\1<a href="#">\\2</a>\\3', $str); } } echo $str; What I'd like to do is restrict the linking to only within the span tag. My brain is all regex-ed out, so any help would be appreciated! Thanks! Darren.

    Read the article

  • .htaccess not working in subfolder

    - by Staffan Estberg
    Hello, I have a couple of sites that are currently under development and I've put them under a specific subfolder for clients/co-workers to view - "http://dev.staffanestberg.com/site-name/". I've run into some problems getting the sites working with .htaccess. I can reach the index page by typing in the url for a site folder but neither img/style/js/etc linking or page rewriting works. Looking for a solution to this, Apache's "RewriteBase" seems to be the most likely one, however I can't get it to work. Tried RewriteBase http://dev.staffanestberg.com/site-name/ RewriteBase /site-name What would be the correct method? Thanks in advance, -Staffan

    Read the article

  • Zip up groups of webpages for viewing in the browser

    - by Arlen Beiler
    I think there should be a standard for saving and viewing bunches of webpages as a website. For instance, say I have a whole bunch of pages, such as I get from the WordPress plugin "Really Static" (which saves the entire site), and I have all the links start with a slash (to make linking to supporting files easier). Now, I can't really use those links if I am reading it from the file system. If there would be a standard where we could zip up files, give them a unique extension (like "hzip" for html zip), and open the file with any browser, which would display it as though the root of that file were the root of the pages. "file://examplefile.hzip/" The links would then all work. This would really help sharing and copying groups of webpages. Is this a good idea? A bad one? What do you think?

    Read the article

  • Trying to verify understanding of Foreign Keys MSSQL

    - by msarchet
    So I'm working on just a learning project to expose myself to doing some things I do not get to do at work. I'm just making a simple bug and case tracking app (I know there are a million this is just to work with some tools I don't get to). So I was designing my database and realized I've never actually used Foreign Keys before in any of my projects, I've used them before but never actually setting up a column as a FK. So I've designed my database as follows, which I think is close to correct (at least for the initial layout). However When I try to add the FK's to the linking Tables I get an error saying, "The tables present in the relationship must have the same number of columns". I'm doing this by in SQLSMS by going to the Keys 'folder' and adding a FK. Is there something that I am doing wrong here, I don't understand why the tables would have to have the same number of columns for me to add a FK relationship between the tables?

    Read the article

  • Maintaining sort order of database table rows

    - by Lox
    Say I have at database table containing information about a news article in each row. The table has an integer "sort" column to dictate the order in which the articles are to be presented on a web site. How do I best implement and maintain this sort order. The problem I want to avoid is having the the articles numbered 1,2,3,4,..,100 and when article number 50 suddenly becomes interesting it gets its sort number set to 1 and then all articles between them must have their sort number increased by one. Sure, setting initial sort numbers to 100,200,300,400 etc. leaves some space for moving around but at some point it will break. Is there a correct way to do this, maybe a completely different approach? Added-1: All article titles are shown in a list linking to the contents, so yes all sorted items are show at once. Added-2: An item is not necessarily moved to the top of the list; any item can be placed anywhere in the ordered list.

    Read the article

  • How to create Web services and link it to Smart device Application?

    - by Crimsonland
    I am a fresh graduate and hired to develop Smart Device Application.They use Data logic Memoir with windows CE 5.0. Even though i have novice skills in programming in vb.net,I just finish my project and applications for Data logic memoir wherein the data has been save to text file or SQL compact server database in the Handheld Device and use Active Sync Connection to pass Data into H/PC to Desktop P.C and Vice Versa.I just shift now to C#.net and start learning it and i just successfully transpose my Smart Device Project from VB to C#. But now i want to Start Projects linking The device to server using Web services but i don't have any idea how to begin?

    Read the article

  • Question about Content Delivery Networks CDN

    - by yummm
    I've built a javascript code that my clients will be installing on their website and they will be calling a file from my server. I'm wondering if it would be better to host the javascript file on a CDN, instead of on my server? The benefits would be better response time and a much higher chance that it will always be available. However, In the future, if the CDN was acquired or went out of business I would have a number of clients linking to a file that doesn't exist. Is there any way to prevent this from happening?

    Read the article

  • How to get the "#" symbol in the :id into the redirect_to method in Rails

    - by Matthias Günther
    Hello, this is a silly questions but I don't understand, why rails isn't evaluating my string as expected. Here is my problem: I want to redirect to an url in the form ~/:controller/index/#_76 redirect_to :action => "index", :id => '#_76' But I'm getting the url in the form: ~/:controller/index/%25_76 and so my anchor for linking to a certain place in the website isn't working. Can someone please explain me, why rails makes this rendering? I think this hase something to do with url encoding. Again thanks for your help, I'm learning every day a little bit more about rails :).

    Read the article

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