Search Results

Search found 7554 results on 303 pages for 'shared secret'.

Page 90/303 | < Previous Page | 86 87 88 89 90 91 92 93 94 95 96 97  | Next Page >

  • Compiling emails into project documentation

    - by zpinter
    What's the best way to turn a bunch of email threads into a working project documentation? This other stack overflow question seems a little stale, but might be the right idea: http://stackoverflow.com/questions/11612/is-there-any-wiki-engine-that-supports-page-creation-by-email Also, Evernote shared notebooks might be an idea: http://blog.evernote.com/2009/06/25/notebook-sharing-phase-1/ Perhaps there's a good way to convert email threads into HTML or Word docs and save them to a shared dropbox folder? My ideal solution would be one where I could forward or copy a thread of emails into one spot, and go back after the fact to organize/categorize/add to it. Any ideas?

    Read the article

  • Sortable_element with RJS does not working

    - by jaycode
    I have a list of images where user can arrange their orders. When user uploaded an image, I want the list to still be sortable. I am using a similar upload that was described here: http://kpumuk.info/ruby-on-rails/in-place-file-upload-with-ruby-on-rails/ Please help. Here are the code for upload in view file: <% form_for [:admin, @new_image], :html => { :target => 'upload_frame', :multipart => true } do |f| %> <%= hidden_field_tag :update, 'product_images'%> <%= f.hidden_field :image_owner_id %> <%= f.hidden_field :image_owner_type %> <%= f.file_field :image_file %><br /> or get image from this URL: <%= f.text_field :image_file_url %> <%= f.hidden_field :image_file_temp %><br /> <%= f.submit "Upload Image" %> <% end %> And in controller view: def create @image = Image.new(params[:image]) logger.debug "params are #{params.inspect}" if @image.save logger.debug "initiating javascript now" responds_to_parent do render :update do |page| logger.debug "javascript test #{sortable_element("product_images", :url => sort_admin_images_path, :handle => "handle", :constraint => false)}" page << "show_notification('Image Uploaded');" page.replace_html params[:update], :partial => '/admin/shared/editor/images', :locals => {:object => @image.image_owner, :updated_image => @image} page << sortable_element("product_images", :url => sort_admin_images_path, :handle => "handle", :constraint => false) end end #render :partial => '/admin/shared/editor/images', :locals => {:object => @image.image_owner, :updated_image => @image} else responds_to_parent do render :update do |page| page << "show_notification('Image Upload Error');" end end end end Or, to rephrase the question: Running this: page.replace_html params[:update], :partial => '/admin/shared/editor/images', :locals => {:object => @image.image_owner, :updated_image => @image} page << sortable_element("product_images", :url => sort_admin_images_path, :handle => "handle", :constraint => false) Will NOT adding sortable list feature. Please help, Thank you

    Read the article

  • Cygwin gdal library load error

    - by Erdem
    I built spatialite library then gdal library with spatialite support. Also built mapserver which depends on gdal with success. There was no problem with linking. When I try to execute a gdal utility I get: $ ogrinfo.exe /usr/local/bin/ogrinfo.exe: error while loading shared libraries: cyggdal-1.dll: cannot open shared object file: No such file or directory But everything seems fine: $ ldd /usr/local/bin/ogrinfo.exe ntdll.dll => /cygdrive/c/WINDOWS/system32/ntdll.dll (0x7c900000) kernel32.dll => /cygdrive/c/WINDOWS/system32/kernel32.dll (0x7c800000) cyggdal-1.dll => /usr/local/bin/cyggdal-1.dll (0x710c0000) cygcurl-4.dll => /usr/bin/cygcurl-4.dll (0x63d80000) cyggcc_s-1.dll => /usr/bin/cyggcc_s-1.dll (0x67f00000) cygwin1.dll => /usr/bin/cygwin1.dll (0x61000000) ADVAPI32.DLL => /cygdrive/c/WINDOWS/system32/ADVAPI32.DLL (0x77dd0000) RPCRT4.dll => /cygdrive/c/WINDOWS/system32/RPCRT4.dll (0x77e70000) Secur32.dll => /cygdrive/c/WINDOWS/system32/Secur32.dll (0x77fe0000) cygcrypto-0.9.8.dll => /usr/bin/cygcrypto-0.9.8.dll (0x6ba40000) cygidn-11.dll => /usr/bin/cygidn-11.dll (0x6c200000) cygiconv-2.dll => /usr/bin/cygiconv-2.dll (0x674c0000) cygintl-8.dll => /usr/bin/cygintl-8.dll (0x6f5c0000) cygssh2-1.dll => /usr/bin/cygssh2-1.dll (0x69ec0000) cygz.dll => /usr/bin/cygz.dll (0x692c0000) cygssl-0.9.8.dll => /usr/bin/cygssl-0.9.8.dll (0x63400000) cygexpat-1.dll => /usr/bin/cygexpat-1.dll (0x66ec0000) cyggeos_c-1.dll => /usr/bin/cyggeos_c-1.dll (0x70180000) cyggeos-3-1-1.dll => /usr/bin/cyggeos-3-1-1.dll (0x4e0000) cygjpeg-7.dll => /usr/bin/cygjpeg-7.dll (0x66e00000) cygpng12.dll => /usr/bin/cygpng12.dll (0x6f200000) If I copy the cyggdal-1.dll to the current folder: $ ogrinfo.exe /usr/local/bin/ogrinfo.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory So what is a '?' library? $ ldd cyggdal-1.dll ntdll.dll => /cygdrive/c/WINDOWS/system32/ntdll.dll (0x7c900000) kernel32.dll => /cygdrive/c/WINDOWS/system32/kernel32.dll (0x7c800000) ??? => ??? (0x710c0000) ??? => ??? (0x63d80000) ??? => ??? (0x67f00000) ??? => ??? (0x61000000) ??? => ??? (0x77dd0000) ??? => ??? (0x77e70000) ??? => ??? (0x77fe0000) ??? => ??? (0x6ba40000) ??? => ??? (0x6c200000) ??? => ??? (0x674c0000) ??? => ??? (0x6f5c0000) ??? => ??? (0x69ec0000) ??? => ??? (0x692c0000) ??? => ??? (0x63400000) ??? => ??? (0x66ec0000) ??? => ??? (0x70180000) ??? => ??? (0x4b0000) ??? => ??? (0x66e00000) ??? => ??? (0x6f200000) What are these "???" ? How to solve this problem?

    Read the article

  • Python, SWIG and other strange things

    - by wanderameise
    hey, I have a firmware for an USB module I can already control by visual C. Now I want to port this to python. for this I need the octopus library which is written in c. I found a file called octopus_wrap which was created by SWIG! then I found a makefile which says: python2.5: swig -python -outdir ./ ../octopus.i gcc -fPIC -c ../../liboctopus/src/octopus.c gcc -fPIC -c ../octopus_wrap.c -I /usr/include/python2.5 gcc -fPIC -shared octopus_wrap.o octopus.o /usr/lib/libusb.so -o _octopus.so python2.4: swig -python -outdir ./ ../octopus.i gcc -fPIC -c ../../liboctopus/src/octopus.c gcc -fPIC -c ../octopus_wrap.c -I /usr/include/python2.4 gcc -fPIC -shared octopus_wrap.o octopus.o /usr/lib/libusb.so -o _octopus.so win: gcc -fPIC -c ../../liboctopus/src/octopus.c -I /c/Programme/libusb-win32-device-bin-0.1.10.1/include gcc -fPIC -c octopus_wrap.c -I /c/Python25/libs -lpython25 -I/c/Python25/include -I /c/Programme/libusb-win32-device-bin-0.1.10.1/include gcc -fPIC -shared *.o -o _octopus.pyd -L/c/Python25/libs -lpython25 -lusb -L/c/Programme/libusb-win32-device-bin-0.1.10.1/lib/gcc clean: rm -f octopus* _octopus* install_python2.4: cp _octopus.so /usr/local/lib/python2.4/site-packages/ cp octopus.py /usr/local/lib/python2.4/site-packages/ install_python2.5: cp _octopus.so /usr/local/lib/python2.5/site-packages/ cp octopus.py /usr/local/lib/python2.5/site-packages/ I dont know how to handle this but as far as I can see octopus.py and _octopus.so are the resulting output files which are relevant to python right? luckily someone already did that and so I put those 2 files to my "python26/lib" folder (hope it doesnt matter if it´s python 2.5 or 2.6?!) So when working with the USB device the octopus.py is the library to work with! Importing this file makes several problems: >>> Traceback (most recent call last): File "C:\Users\ameise\My Dropbox\µC\AVR\OCTOPUS\octopususb-0.5\demos\python \blink_status.py", line 8, in <module> from octopus import * File "C:\Python26\lib\octopus.py", line 7, in <module> import _octopus ImportError: DLL load failed: module not found. and here´s the related line 7 : import _octopus So there´s a problem considering the .so file! What could be my next step? I know that´s a lot of confusing stuff but I hope anyone of you could bring some light in my mind! thy in advance

    Read the article

  • In linux, is there a way to set a default permission for newly created files and directories under a

    - by David Dean
    I have a bunch of long-running scripts and applications that are storing output results in a directory shared amongst a few users. I would like a way to make sure that every file and directory created under this shared directory automatically had u=rwxg=rwxo=r permissions. I know that I could use umask 006 at the head off my various scripts, but I don't like that approach as many users write their own scripts and may forget to set the umask themselves. I really just want the filesystem to set newly created files and directories with a certain permission if it is in a certain folder. Is this at all possible? Update: I think it can be done with POSIX ACLs, using the Default ACL functionality, but it's all a bit over my head at the moment. If anybody can explain how to use Default ACLs it would probably answer this question nicely.

    Read the article

  • openmp in mex : stackoverflow error

    - by Edwin
    i have got the following fraction of code that getting me the stack overflow error #pragma omp parallel shared(Mo1, Mo2, sum_normalized_p_gn, Data, Mean_Out,Covar_Out,Prior_Out, det) private(i) num_threads( number_threads ) { //every thread has a new copy double* normalized_p_gn = (double*)malloc(NMIX*sizeof(double)); #pragma omp critical { int id = omp_get_thread_num(); int threads = omp_get_num_threads(); mexEvalString("drawnow"); } #pragma omp for //some parallel process..... } the variables declared in the shared are created by malloc. and they consumes with large amount of memory there are 2 questions regarding to the above code. 1) why this would generate the stack overflow error( i.e. segmentation fault) before it goes into the parallel for loop? it works fine when it runs in the sequential mode.... 2) am i right to dynamic allocate memory for each thread like "normalized_p_gn" above? Regards Edwin

    Read the article

  • How should I provide access to this custom DAL?

    - by Casey
    I'm writing a custom DAL (VB.NET) for an ordering system project. I'd like to explain how it is coded now, and receive some alternate ideas to make coding against the DAL easier/more readable. The DAL is part of an n-tier (not n-layer) application, where each tier is in it's own assembly/DLL. The DAL consists of several classes that have specific behavior. For instance, there is an Order class that is responsible for retrieving and saving orders. Most of the classes have only two methods, a "Get" and a "Save," with multiple overloads for each. These classes are marked as Friend and are only visible to the DAL (which is in it's own assembly). In most cases, the DAL returns what I will call a "Data Object." This object is a class that contains only data and validation, and is located in a common assembly that both the BLL and DAL can read. To provide public access to the DAL, I currently have a static (module) class that has many shared members. A simplified version looks something like this: Public Class DAL Private Sub New End Sub Public Shared Function GetOrder(OrderID as String) as OrderData Dim OrderGetter as New OrderClass Return OrderGetter.GetOrder(OrderID) End Function End Class Friend Class OrderClass Friend Function GetOrder(OrderID as string) as OrderData End Function End Class The BLL would call for an order like this: DAL.GetOrder("123456") As you can imagine, this gets cumbersome very quickly. I'm mainly interested in structuring access to the DAL so that Intellisense is very intuitive. As it stands now, there are too many methods/functions in the DAL class with similar names. One idea I had is to break down the DAL into nested classes: Public Class DAL Private Sub New End Sub Public Class Orders Private Sub New End Sub Public Shared Function Get(OrderID as string) as OrderData End Function End Class End Class So the BLL would call like this: DAL.Orders.Get("12345") This cleans it up a bit, but it leaves a lot of classes that only have references to other classes, which I don't like for some reason. Without resorting to passing DB specific instructions (like where clauses) from BLL to DAL, what is the best or most common practice for providing a single point of access for the DAL?

    Read the article

  • Best practice for sharing code between OSX and IOS app

    - by Alberto
    I am creating an iOS version of an existing OSX app and am wondering what the best practices are for sharing code between the two. The code in question only depends on the foundation framework and the Sqlite dynamic library, so it should compile and run fine on both platforms. It seems to me there are three possible options: Create a single project with and OSX and an IOS targets, add source files to each target as appropriate. Create two separate projects for the OSX and IOS apps, put shared code in a common location in the workspace and add it as reference to both projects. Create three projects: OSX app, IOS app and a shared static library with an OSX and an IOS targets; add each library target to the respective application. Is there any reason one of the above approaches may be better than the other two? If not, option 2 seems to be the simplest by far.

    Read the article

  • Am I Leaking ADO.NET Connections?

    - by HardCode
    Here is an example of my code in a DAL. All calls to the database's Stored Procedures are structured this way, and there is no in-line SQL. Friend Shared Function Save(ByVal s As MyClass) As Boolean Dim cn As SqlClient.SqlConnection = Dal.Connections.MyAppConnection Dim cmd As New SqlClient.SqlCommand Try cmd.Connection = cn cmd.CommandType = CommandType.StoredProcedure cmd.CommandText = "proc_save_my_class" cmd.Parameters.AddWithValue("@param1", s.Foo) cmd.Parameters.AddWithValue("@param2", s.Bar) Return True Finally Dal.Utility.CleanupAdoObjects(cmd, cn) End Try End Function Here is the Connection factory (if I am using the correct term): Friend Shared Function MyAppConnection() As SqlClient.SqlConnection Dim cn As New SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("MyConnectionString").ToString) cn.Open() If cn.State <> ConnectionState.Open Then ' CriticalException is a custom object inheriting from Exception. Throw New CriticalException("Could not connect to the database.") Else Return cn End If End Function Here is the Dal.Utility.CleaupAdoObjects() function: Friend Shared Sub CleanupAdoObjects(ByVal cmd As SqlCommand, ByVal cn As SqlConnection) If cmd IsNot Nothing Then cmd.Dispose() If cn IsNot Nothing AndAlso cn.State <> ConnectionState.Closed Then cn.Close() End Sub I am getting a lot of "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding." error messages reported by the users. The application's DAL opens a connection, reads or saves data, and closes it. No connections are ever left open - intentionally! There is nothing obvious on the Windows 2000 Server hosting the SQL Server 2000 that would indicate a problem. Nothing in the Event Logs and nothing in the SQL Server logs. The timeouts happen randomly - I cannot reproduce. It happens early in the day with only 1 to 5 users in the system. It also happens with around 50 users in the system. The most connections to SQL Server via Performance Monitor, for all databases, has been about 74. The timeouts happen in code that both saves to, and reads from, the database in different parts of the application. The stack trace does not point to one or two offending DAL functions. It's happened in many different places. Does my ADO.NET code appear to be able to leak connections? I've goolged around a bit, and I've read that if the connection pool fills up, this can happen. However, I'm not explicitly setting any connection pooling. I've even tried to increase the Connection Timeout in the connection string, but timeouts happen long before the 300 second (5 minute) value: <add name="MyConnectionString" connectionString="Data Source=MyServer;Initial Catalog=MyDatabase;Integrated Security=SSPI;Connection Timeout=300;"/> I'm at a total loss already as to what is causing these Timeout issues. Any ideas are appreciated.

    Read the article

  • Extract string from string using Regex

    - by stacker
    I want to extract MasterPage value directive from a view page. I want the fastest way to do that, taking into account a very big aspx pages, and a very small ones. I think the best way is to do that with two stages: Extract the page directive section from the view (using Regex): <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> Then, extract the value inside MasterPageFile attribute. The result needs to be: ~/Views/Shared/Site.Master. Can I have help from someone to implement this? I badly want to use only regex, but I don't Regex expert. Another thing, Do you think that Regex is the fastest way to do this?

    Read the article

  • ASP.NET MVC 2 RC 2 returns Area-specific controller when no area specified

    - by Bryan
    I have a basic MVC 2 (RC2) site with one base-level controller ("Home"), and one area ("Admin") with one controller ("Abstract"). When i call http://website/Abstract - the Abstract controller in the Admin area gets called even though i haven't specified the Area in the URL. To make matters worse - it doesn't seem to know it's under Admin because it can't find the associated view and just returns: The view 'Index' or its master was not found. The following locations were searched: ~/Views/Abstract/Index.aspx ~/Views/Abstract/Index.ascx ~/Views/Shared/Index.aspx ~/Views/Shared/Index.ascx Am i doing something wrong? Is this a bug? A feature?

    Read the article

  • controlling threads flow

    - by owca
    I had a task to write simple game simulating two players picking up 1-3 matches one after another until the pile is gone. I managed to do it for computer choosing random value of matches but now I'd like to go further and allow humans to play the game. Here's what I already have : http://paste.pocoo.org/show/201761/ Class Player is a computer player, and PlayerMan should be human being. Problem is, that thread of PlayerMan should wait until proper value of matches is given but I cannot make it work this way. Logic is as follows: thread runs until matches equals to zero. If player number is correct at the moment function pickMatches() is called. After decreasing number of matches on table, thread should wait and another thread should be notified. I know I must use wait() and notify() but I can't place them right. Class Shared keeps the value of current player, and also amount of matches. public void suspendThread() { suspended = true; } public void resumeThread() { suspended = false; } @Override public void run(){ int matches=1; int which = 0; int tmp=0; Shared data = this.selectData(); String name = this.returnName(); int number = this.getNumber(); while(data.getMatches() != 0){ while(!suspended){ try{ which = data.getCurrent(); if(number == which){ matches = pickMatches(); tmp = data.getMatches() - matches; data.setMatches(tmp, number); if(data.getMatches() == 0){ System.out.println(" "+ name+" takes "+matches+" matches."); System.out.println("Winner is player: "+name); stop(); } System.out.println(" "+ name+" takes "+matches+" matches."); if(number != 0){ data.setCurrent(0); } else{ data.setCurrent(1); } } this.suspendThread(); notifyAll(); wait(); }catch(InterruptedException exc) {} } } } @Override synchronized public int pickMatches(){ Scanner scanner = new Scanner(System.in); int n = 0; Shared data = this.selectData(); System.out.println("Choose amount of matches (from 1 to 3): "); if(data.getMatches() == 1){ System.out.println("There's only 1 match left !"); while(n != 1){ n = scanner.nextInt(); } } else{ do{ n = scanner.nextInt(); } while(n <= 1 && n >= 3); } return n; } }

    Read the article

  • Running Awk command on a cluster

    - by alex
    How do you execute a Unix shell command (awk script, a pipe etc) on a cluster in parallel (step 1) and collect the results back to a central node (step 2) Hadoop seems to be a huge overkill with its 600k LOC and its performance is terrible (takes minutes just to initialize the job) i don't need shared memory, or - something like MPI/openMP as i dont need to synchronize or share anything, don't need a distributed VM or anything as complex Google's SawZall seems to work only with Google proprietary MapReduce API some distributed shell packages i found failed to compile, but there must be a simple way to run a data-centric batch job on a cluster, something as close as possible to native OS, may be using unix RPC calls i liked rsync simplicity but it seem to update remote notes sequentially, and you cant use it for executing scripts as afar as i know switching to Plan 9 or some other network oriented OS looks like another overkill i'm looking for a simple, distributed way to run awk scripts or similar - as close as possible to data with a minimal initialization overhead, in a nothing-shared, nothing-synchronized fashion Thanks Alex

    Read the article

  • Equality and Assigment Operators

    - by Jeremy Smith
    I have a assembly compiled in VB.NET that contains two operators: Public Shared Operator =(quarterA As CalendarQuarter, quarterB As CalendarQuarter) As Boolean Return quarterA.StartDate = quarterB.StartDate AndAlso quarterA.EndDate = quarterB.EndDate AndAlso quarterA.Quarter = quarterB.Quarter End Operator Public Shared Operator <>(quarterA As CalendarQuarter, quarterB As CalendarQuarter) As Boolean Return Not (quarterA = quarterB) End Operator However, when using the assembly in C# to perform equality checks if (qtr != null) I receive the error: Cannot implicity convert type 'object' to 'bool' My original intent with the = operator was only for assignment purposes in VB, so I may be way off base (I don't use custom operators too often). What do I need to do to make the operator behave with both equality and assignment operations?

    Read the article

  • Some more multitasking java issues

    - by owca
    I had a task to write simple game simulating two players picking up 1-3 matches one after another until the pile is gone. I managed to do it for computer choosing random value of matches but now I'd like to go further and allow humans to play the game. Here's what I already have : http://paste.pocoo.org/show/200660/ Class Player is a computer player, and PlayerMan should be human being. Problem is, that thread of PlayerMan should wait until proper value of matches is given but I cannot make it work this way. When I type the values it sometimes catches them and decrease amount of matches but that's not exactly what I was up to :) Logics is : I check the value of current player. If it corresponds to this of the thread currently active I use scanner to catch the amount of matches. Else I wait one second (I know it's kinda harsh solution, but I have no other idea how to do it). Class Shared keeps the value of current player, and also amount of matches. By the way, is there any way I can make Player and Shared attributes private instead of public and still make the code work ? CONSOLE and INPUT-DIALOG is just for choosing way of inserting values. class PlayerMan extends Player{ static final int CONSOLE=0; static final int INPUT_DIALOG=1; private int input; public PlayerMan(String name, Shared data, int c){ super(name, data); input = c; } @Override public void run(){ Scanner scanner = new Scanner(System.in); int n = 0; System.out.println("Matches on table: "+data.matchesAmount); System.out.println("which: "+data.which); System.out.println("number: "+number); while(data.matchesAmount != 0){ if(number == data.which){ System.out.println("Choose amount of matches (from 1 to 3): "); n = scanner.nextInt(); if(data.matchesAmount == 1){ System.out.println("There's only 1 match left !"); while(n != 1){ n = scanner.nextInt(); } } else{ do{ n = scanner.nextInt(); } while(n <= 1 && n >= 3); } data.matchesAmount = data.matchesAmount - n; System.out.println(" "+ name+" takes "+n+" matches."); if(number != 0){ data.which = 0; } else{ data.which = 1; } } else{ try { Thread.sleep(1000); } catch(InterruptedException exc) { System.out.println("End of thread."); return; } } System.out.println("Matches on table: "+data.matchesAmount); } if(data.matchesAmount == 0){ System.out.println("Winner is player: "+name); stop(); } } }

    Read the article

  • Crystal Reports: global variable running total not displaying in header

    - by phill
    Using Crystal Reports I'm trying to display the running total of a database field in the header where all the labels are. I've attempted to do this by placing the running total (RTversion) into a formula field with the following: Shared stringvar CurrentVers; CurrentVers := {#CurrentVers}; and then in the page header section I have the following: Shared stringvar CurrentVers; EvaluateAFter({#currentVers}); CurrentVers; with {#CurrentVers} running the 1st largest number. Is this incorrect? Update: The goal is to display the latest version in the header near the labels to show what the current verseion is for comparison.

    Read the article

  • SQL Loop over a family tree

    - by simon831
    Using SQL server 2008. I have a family tree of animals stored in a table, and want to give some information on how 'genetically diverse' (or not) the offspring is. In SQL how can I produce sensible metrics to show how closely related the parents are? Perhaps some sort of percentage of shared blood, or a number of generations to go back before there is a shared ancestor? AnimalTable Id Name mumId dadId select * from AnimalTable child inner join AnimalTable mum on child.[mumId] = mum.[Id] inner join AnimalTable dad on child.[dadId] = dad.[Id] inner join AnimalTable mums_mum on mum.[mumId] = mums_mum.[Id] inner join AnimalTable mums_dad on mum.[dadId] = mums_dad.[Id] inner join AnimalTable dads_mum on dad.[mumId] = dads_mum.[Id] inner join AnimalTable dads_dad on dad.[dadId] = dads_dad.[Id]

    Read the article

  • How to synchronize SQL Server 2008 database with SQL Server 2005 database?

    - by James McFarland
    I am using VS 2008 Team Suite and SQL Server 2008 in my development environment. I am deploying to a shared-host website with shared-host SQL Server 2005. I want to push changes from my development environment to my production host. I tried using Data | Schema Compare... and it reports to me that it does not support SQL Server 2008. What do people use for this (Besides Red-Gate tools - I use those at my day job, and they rock...this is a volunteer thing for my son's school)? I am looking for something very inexpensive if not free.

    Read the article

  • Boost python module building

    - by Ockonal
    Hello, I'm using boost.python and I need in building some module for it. I have an some_module.cpp file in project. How can I build it correctly to the shared library for using it with python in future? When I learned it, I had only 1 file and I built it with command: gcc -shared -Wl,-soname,hello.so -o hello.so test.cpp -I /usr/include/python2.6/ -lboost_python And I don't know how to configure it in whole project. I'm using Eclipse and Code::Blocks IDEs.

    Read the article

  • HttpContext.Current.Request.UserHostName is empty when called from a class

    - by John Galt
    I have various web pages that need to build up a URL to display or place it in an emitted email message. The code I inherited had this value for the name of the webserver in a Public Const in a Public Class called FixedConstants. For example: Public Const cdServerName As String = "WEBSERVERNAME" Trying to improve on this, I wrote this: Public Class UIFunction Public Shared myhttpcontext As HttpContext Public Shared Function cdWebServer() As String Dim s As New StringBuilder("http://") Dim h As String h = String.Empty Try h = Current.Request.ServerVariables("REMOTE_HOST").ToString() Catch ex As Exception Dim m As String m = ex.Message.ToString() 'Ignore this should-not-occur thingy End Try If h = String.Empty Then h = "SomeWebServer" End If s.Append(h) s.Append("/") Return s.ToString() End Function I've tried different things while debugging such as HttpContext.Current.Request.UserHostName and I always get an empty string which pumps out my default string "SomeWebServer". I know Request.UserHostName or Request.ServerVariables("REMOTE_HOST") works when invoked from a page but why does this return empty when invoked from a called method of a class file (i.e. UIFunction.vb)?

    Read the article

  • Is it safe to lock a static variable in a non-static class?

    - by Dario Solera
    I've got a class that manages a shared resource. Now, since access to the resource depends on many parameters, this class is instantiated and disposed several times during the normal execution of the program. The shared resource does not support concurrency, so some kind of locking is needed. The first thing that came into my mind is having a static instance in the class, and acquire locks on it, like this: // This thing is static! static readonly object MyLock = new object(); // This thing is NOT static! MyResource _resource = ...; public DoSomeWork() { lock(MyLock) { _resource.Access(); } } Does that make sense, or would you use another approach?

    Read the article

  • Changing the Default View Engine's view search behavior.

    - by bradhe
    I'm working with ASP.NET MVC 2. I have a bunch of partial views that I render based on different conditions within the same controller. I'd like to not put the physical partial view files in with the controller's other views. I know that when I want a ViewResult using the View() or PartialView() methods the default view engine will search through the folder in the Views directory associated with the controller (i.e. if my controller is called Register it will look in the Register folder under Views) and also in the Shared folder. Is there any way to change this behavior, or perhaps tell it specifically where to look for the view -- heck, even give it a specific file to render? Is that possible? Perhaps even a sub-folder under the Shared folder will work...

    Read the article

< Previous Page | 86 87 88 89 90 91 92 93 94 95 96 97  | Next Page >