Daily Archives

Articles indexed Wednesday April 4 2012

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

  • JSON Rpc libraries for use with .NET

    - by Deeptechtons
    I am looking into JSON RPC libraries for .net that are free to use in commercial applications. Up until now i just seem to have found JROCK. What other libraries, architecture have i got similar to JRock for .NET 2.0 What is the difference between a [WebMethod] in asmx web-service returning a instance of a class and a JSON Rpc method as in the JRock website page. Do i have any usability benefits, performance benefits or any benefits of using one over the other

    Read the article

  • Fixed div once page is scrolled is flickering

    - by jasondavis
    I am trying to have an advertisement block/div that will be hald way down the page, once you scroll do the page to this point it will stick to the top. Here is a demo of what I am trying to do and the code I am using to do it with... http://jsfiddle.net/jasondavis/6vpA7/3/embedded/result/ In the demo it works perfectly how I am wanting it to be, however when I implement it on my live site, http://goo.gl/zuaZx it works but when you scroll down the div flickers in and out of view on each scroll or down key press. On my site to see the problem live it is the blokc on the right sidebar that says "Recommended Books" Here is the code I am using... $(document).ready( function() { $(window).scroll( function() { if ($(window).scrollTop() > $('#social-container').offset().top) $('#social').addClass('floating'); else $('#social').removeClass('floating'); } ); } );? css #social.floating { position: fixed; top: 0; }? My demo jsfiddle where it works correctly http://jsfiddle.net/jasondavis/6vpA7/3/ The only thing different on my live site is the div/id name is different. As you can see it is somewhat working on my live site except the flickering in and out of view as you scroll down the page. Anyone have any ideas why this would happen on my live site and not on my jsfiddle demo?

    Read the article

  • autotools: no rule to make target all

    - by Raffo
    I'm trying to port an application I'm developing to autotools. I'm not an expert in writing makefiles and it's a requisite for me to be able to use autotools. In particular, the structure of the project is the following: .. ../src/Main.cpp ../src/foo/ ../src/foo/x.cpp ../src/foo/y.cpp ../src/foo/A/k.cpp ../src/foo/A/Makefile.am ../src/foo/Makefile.am ../src/bar/ ../src/bar/z.cpp ../src/bar/w.cpp ../src/bar/Makefile.am ../inc/foo/ ../inc/bar/ ../inc/foo/A ../configure.in ../Makefile.am The root folder of the project contains a "src" folder containing the main of the program AND a number of subfolders containing the other sources of the program. The root of the project also contains an "inc" folder containing the .h files that are nothing more than the definitions of the classes in "src", thus "inc" reflects the structure of "src". I have written the following configure.in in the root: AC_INIT([PNAME], [1.0]) AC_CONFIG_SRCDIR([src/Main.cpp]) AC_CONFIG_HEADER([config.h]) AC_PROG_CXX AC_PROG_CC AC_PROG_LIBTOOL AM_INIT_AUTOMAKE([foreign]) AC_CONFIG_FILES([Makefile src/Makefile src/foo/Makefile src/foo/A/Makefile src/bar/Makefile]) AC_OUTPUT And the following is ../Makefile.am SUBDIRS = src and then in ../src where the main of the project is contained: bin_PROGRAMS = pname gsi_SOURCES = Main.cpp AM_CPPFLAGS = -I../../inc/foo\ -I../../inc/foo/A \ -I../../inc/bar/ pname_LDADD= foo/libfoo.a bar/libbar.a SUBDIRS = foo bar and in ../src/foo noinst_LIBRARIES = libfoo.a libfoo_a_SOURCES = \ x.cpp \ y.cpp AM_CPPFLAGS = \ -I../../inc/foo \ -I../../inc/foo/A \ -I../../inc/bar And the analogous in src/bar. The problem is that after calling automake and autoconf, when calling "make" the compilation fails. In particular, the program enters the directory src, then foo and creates libfoo.a, but the same fail for libbar.a, with the following error: Making all in bar make[3]: Entering directory `/user/Raffo/project/src/bar' make[3]: *** No rule to make target `all'. Stop. I have read the autotools documentation, but I'm not able to find a similar example to the one I am working on. Unfortunately I can't change the directory structure as this is a fixed requisite of the project I'm working on. I don't know if you can help me or give me any hint, but maybe you can guess the error or give me a link to a similar structured example. Thank you.

    Read the article

  • TFS Integration with Rational ClearQuest and Requirement Manager

    - by Kangkan
    I am working on an integration approach for integrating Rationa (IBM Jazz) Requirement Manager (RM) and Clear Quest (CQ) with TFS. As the teams are moving from ClearCase to TFS, what we are looking at is still being able to manage the requirements in RM and manage testing using CQ. The flow will be something like: Requirements are planned and detailed in RM Create work items in TFS connected to the Requirements in RM Create design and code using VS2010 and managing the version control in TFS Creating test plans and test cases in CQ (connected to requirements in RM) Run test against builds in TFS Publish test results in CQ against builds in TFS Run reports in RM, CQ and TFS that links up the items across the platforms. I have started looking at TFS Integration platform. But shall like to have your guidance for an early resolution and better solution approach.

    Read the article

  • Nested attributes form for model which belongs_to few models

    - by ExiRe
    I have few models - User, Teacher and TeacherLeader. class User < ActiveRecord::Base attr_accessible ..., :teacher_attributes has_one :teacher has_one :teacher_leader accepts_nested_attributes_for :teacher_leader end class Teacher < ActiveRecord::Base belongs_to :user has_one :teacher_leader end class TeacherLeader < ActiveRecord::Base belongs_to :user belongs_to :teacher end I would like to fill TeacherLeader via nested attributes. So, i do such things in controller: class TeacherLeadersController < ApplicationController ... def new @user = User.new @teacher_leader = @user.build_teacher_leader @teachers_collection = Teacher.all.collect do |t| [ "#{t.teacher_last_name} #{t.teacher_first_name} #{t.teacher_middle_name}", t.id ] end @choosen_teacher = @teachers_collection.first.last unless @teachers_collection.empty? end end And also have such view (new.html.erb): <%= form_for @user, :url => teacher_leaders_url, :html => {:class => "form-horizontal"} do |f| %> <%= field_set_tag do %> <% f.fields_for :teacher_leader do |tl| %> <div class="control-group"> <%= tl.label :teacher_id, "Teacher names", :class => "control-label" %> <div class="controls"> <%= select_tag( :teacher_id, options_for_select( @teachers_collection, @choosen_teacher )) %> </div> </div> <% end %> <div class="control-group"> <%= f.label :user_login, "Login", :class => "control-label" %> <div class="controls"> <%= f.text_field :user_login, :placeholder => @everpresent_field_placeholder %> </div> </div> <div class="control-group"> <%= f.label :password, "Pass", :class => "control-label" %> <div class="controls"> <%= f.text_field :password, :placeholder => @everpresent_field_placeholder %> </div> </div> <% end %> <%= f.submit "Create", :class => "btn btn-large btn-success" %> <% end %> Problem is that select form here does NOT appear. Why? Do i do something wrong?

    Read the article

  • Show/hide text based on optgroup selection using Jquery

    - by general exception
    I have the following HTML markup:- <select name="Fault" class="textbox" id="fault"> <option>Single Light Out</option> <option>Light Dim</option> <option>Light On In Daytime</option> <option>Erratic Operating Times</option> <option>Flashing/Flickering</option> <option>Causing Tv/Radio Interference</option> <option>Obscured By Hedge/Tree Branches</option> <option>Bracket Arm Needs Realigning</option> <option>Shade/Cover Missing</option> <option>Column In Poor Condition</option> <option>Several Lights Out (please state how many)</option> <option>Column Leaning</option> <option>Door Missing/Wires Exposed</option> <option>Column Knocked Down/Traffic Accident</option> <option>Lantern Or Bracket Broken Off/Hanging On Wires</option> <option>Shade/Cover Hanging Open</option> </select> <span id="faulttext" style="color:Red; display:none">Text in the span</span> This Jquery snippet adds the last 5 options into an option group. $('#fault option:nth-child(n+12)').wrapAll('<optgroup label="Urgent Reasons">'); What I want to do is, remove the display:none if any of the items within the <optgroup> are selected, effectively displaying the span message, possibly with a fade in transition, and also hide the message if any options outside of the <optgroup> are selected.

    Read the article

  • Document width calculated via Javascript is different in Firefox compared to other browsers

    - by Scarpelius
    I have a problem with retrieving the current page document width from Mozilla Firefox. While the rest of the browsers report the correct width of the document, Firefox reports a smaller one (example: at screen resolution of 1920x1080 IE, Chrome and Safari reports 1920 while Firefox reports 1903). I use document width in $(document).ready(function() { ... }); to reposition a div element. Funny this is that after using alert() inside this function, the element reposition correctly, though the document size is still smaller than other browsers.

    Read the article

  • Error while starting Rails server

    - by Girish Anand
    Hello i am new to ruby and rails ... but when i am starting the rail server i am getting this error This is the error i am getting D:\mynewapp>ruby script/server = Booting WEBrick = Rails 2.3.5 application starting on http://0.0.0.0:3000 D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require': n such file to load -- rush (MissingSourceFile) from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inblock in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:521:in new_constants_in' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inrequire' from D:/mynewapp/vendor/gems/delayed_job-1.7.0/lib/delayed/worker.r 1:in <top (required)>' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inblock in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:521:in new_constants_in' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inrequire' from D:/mynewapp/vendor/gems/delayed_job-1.7.0/lib/delayed_job.rb:6 n <top (required)>' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inblock in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:521:in new_constants_in' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inrequire' from D:/mynewapp/config/environment.rb:39:in block in <top (requir )>' from D:/ruby/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/initializer.rb:1 :inrun' from D:/mynewapp/config/environment.rb:9:in <top (required)>' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inblock in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:521:in new_constants_in' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inrequire' from D:/ruby/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/commands/server. :84:in <top (required)>' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from script/server:3:in' Any help will be appreciated Thanks in Advance

    Read the article

  • How do I use .htaccess to redirect to a URL containing HTTP_HOST?

    - by Jon Cram
    Problem I need to redirect some short convenience URLs to longer actual URLs. The site in question uses a set of subdomains to identify a set of development or live versions. I would like the URL to which certain requests are redirected to include the HTTP_HOST such that I don't have to create a custom .htaccess file for each host. Host-specific Example (snipped from .htaccess file) Redirect /terms http://support.dev01.example.com/articles/terms/ This example works fine for the development version running at dev01.example.com. If I use the same line in the main .htaccess file for the development version running under dev02.example.com I'd end up being redirected to the wrong place. Ideal rule (not sure of the correct syntax) Redirect /terms http://support.{HTTP_HOST}/articles/terms/ This rule does not work and merely serves as an example of what I'd like to achieve. I could then use the exact same rule under many different hosts and get the correct result. Answers? Can this be done with mod_alias or does it require the more complex mod_rewrite? How can this be achieved using mod_alias or mod_rewrite? I'd prefer a mod_alias solution if possible. Clarifications I'm not staying on the same server. I'd like: http://example.com/terms/ - http://support.example.com/articles/terms/ https://secure.example.com/terms/ - http://support.example.com/articles/terms/ http://dev.example.com/terms/ - http://support.dev.example.com/articles/terms/ https://secure.dev.example.com/terms/ - http://support.dev.example.com/articles/terms/ I'd like to be able to use the same rule in the .htaccess file on both example.com and dev.example.com. In this situation I'd need to be able to refer to the HTTP_HOST as a variable rather than specifying it literally in the URL to which requests are redirected. I'll investigate the HTTP_HOST parameter as suggested but was hoping for a working example.

    Read the article

  • Indexing with pointer C/C++

    - by Leavenotrace
    Hey I'm trying to write a program to carry out newtons method and find the roots of the equation exp(-x)-(x^2)+3. It works in so far as finding the root, but I also want it to print out the root after each iteration but I can't get it to work, Could anyone point out my mistake I think its something to do with my indexing? Thanks a million :) #include <stdio.h> #include <math.h> #include <malloc.h> //Define Functions: double evalf(double x) { double answer=exp(-x)-(x*x)+3; return(answer); } double evalfprime(double x) { double answer=-exp(-x)-2*x; return(answer); } double *newton(double initialrt,double accuracy,double *data) { double root[102]; data=root; int maxit = 0; root[0] = initialrt; for (int i=1;i<102;i++) { *(data+i)=*(data+i-1)-evalf(*(data+i-1))/evalfprime(*(data+i-1)); if(fabs(*(data+i)-*(data+i-1))<accuracy) { maxit=i; break; } maxit=i; } if((maxit+1==102)&&(fabs(*(data+maxit)-*(data+maxit-1))>accuracy)) { printf("\nMax iteration reached, method terminated"); } else { printf("\nMethod successful"); printf("\nNumber of iterations: %d\nRoot Estimate: %lf\n",maxit+1,*(data+maxit)); } return(data); } int main() { double root,accuracy; double *data=(double*)malloc(sizeof(double)*102); printf("NEWTONS METHOD PROGRAMME:\nEquation: f(x)=exp(-x)-x^2+3=0\nMax No iterations=100\n\nEnter initial root estimate\n>> "); scanf("%lf",&root); _flushall(); printf("\nEnter accuracy required:\n>>"); scanf("%lf",&accuracy); *data= *newton(root,accuracy,data); printf("Iteration Root Error\n "); printf("%d %lf \n", 0,*(data)); for(int i=1;i<102;i++) { printf("%d %5.5lf %5.5lf\n", i,*(data+i),*(data+i)-*(data+i-1)); if(*(data+i*sizeof(double))-*(data+i*sizeof(double)-1)==0) { break; } } getchar(); getchar(); free(data); return(0); }

    Read the article

  • CRM 2011 - How to update Marketing List Member Type options to reflect entity display name changes?

    - by jwood
    Is there a way of updating the Option Set options for the Marketing List Member Type to reflect an entity display name change? i.e. if the account entity has been renamed to organisation, is there a supported way of reflecting this in the displayed options? I have been able to achieve this using javascript, but wondered if there was a better way of achieving this? At the moment I am unable to change the descriptions of the current options: Account, Contact or Lead.

    Read the article

  • SSLException: Keystore does not support enabled cipher suites

    - by wurfkeks
    I want to implement a small android application, that works as SSL Server. After lot of problems with the right format of the keystore, I solved this and run into the next one. My keystore file is properly loaded by the KeyStore class. But when I try to open the server socket (socket.accept()) the following error is raised: javax.net.ssl.SSLException: Could not find any key store entries to support the enabled cipher suites. I generated my keystore with this command: keytool -genkey -keystore test.keystore -keyalg RSA -keypass ssltest -storepass ssltest -storetype BKS -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath bcprov.jar with the Unlimited Strength Jurisdiction Policy for Java SE6 applied to my jre6. I got a list of supported ciphers suites by calling socket.getSupportedCipherSuites() that prints a long list with very different combinations. But I don't know how to get a supported key. I also tried the android debug keystore after converting it to BKS format using portecle but get still the same error. Can anyone help and tell how I can generate a key that is compatible with one of the cipher suites? Version Information: targetSDK: 15 tested on emulator running 4.0.3 and real device running 2.3.3 BounceCastle 1.46 portecle 1.7 Code of my test application: public class SSLTestActivity extends Activity implements Runnable { SSLServerSocket mServerSocket; ToggleButton tglBtn; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); this.tglBtn = (ToggleButton)findViewById(R.id.toggleButton1); tglBtn.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if (isChecked) { new Thread(SSLTestActivity.this).run(); } else { try { if (mServerSocket != null) mServerSocket.close(); } catch (IOException e) { Log.e("SSLTestActivity", e.toString()); } } } }); } @Override public void run() { try { KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); keyStore.load(getAssets().open("test.keystore"), "ssltest".toCharArray()); ServerSocketFactory socketFactory = SSLServerSocketFactory.getDefault(); mServerSocket = (SSLServerSocket) socketFactory.createServerSocket(8080); while (!mServerSocket.isClosed()) { Socket client = mServerSocket.accept(); PrintWriter output = new PrintWriter(client.getOutputStream(), true); output.println("So long, and thanks for all the fish!"); client.close(); } } catch (Exception e) { Log.e("SSLTestActivity", e.toString()); } } }

    Read the article

  • Regularly update database without browser/user

    - by Chris M
    I currently have a MySQL database which I was hoping to use to store regularly updated data from a temperature sensor connected to the internet. I currently have a page that, when opened, will grab the current temperature and the current timestamp and add it as an entry to the database, but I was looking for a way to do that without me refreshing the page every 5 seconds. Detail: The data comes from an Arduino Ethernet, posted to an IP address. Currently, I'm using cURL to grab the data from the IP, add a timestamp and save it to the DB. Obviously only updates when the page is refreshed (it uses PHP). Here is a live feed of the data - http://wetdreams.org.uk/ChrisProject/UI/live_graph_two.html TL;DR - Basically I need a middle man to grab the data from the IP and post it to a MySQL Edit: Thanks for all the advice. There might be a little bit of confusion, I'm looking for a solution that (ideally) doesn't require a computer to be on at all (other than the Server containing Database). Since I'm looking to store data over long periods of time (weeks), I'd like to set it up and leave a script running on the server (or Arduino) that gets the temp and posts it to the Database. In my head I would like to have a page on the server that automatically (without any browser open, or any other prompting other than a timer) calls a PHP script. Hope that clears things up!

    Read the article

  • How to retrieve Sharepoint data from a Windows Forms Application.

    - by Michael M. Bangoy
    In this demo I'm going to demonstrate how to retrieve Sharepoint data and display it on a Windows Forms Application. 1. Open Visual Studio 2010 and create a new Project. 2. In the project template select Windows Forms Application. 3. In order to communicate with Sharepoint from a Windows Forms Application we need to add the 2 Sharepoint Client DLL located in c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI. 4. Select the Microsoft.Sharepoint.Client.dll and Microsoft.Sharepoint.Client.Runtime.dll. That's it we're ready to write our codes. Note: In this example I've added to controls on the form, the controls are Button, TextBox, Label and DataGridView. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.Objects; using System.Drawing; using System.Linq; using System.Text; using System.Security; using System.Windows.Forms; using SP = Microsoft.SharePoint.Client; namespace ClientObjectModel { public partial class Form1 : Form { // declare string url of the Sharepoint site string _context = "theurlofyoursharepointsite"; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { } private void getsitetitle() {    SP.ClientContext context = new SP.ClientContext(_context);    SP.Web _site = context.Web;    context.Load(_site);    context.ExecuteQuery();    txttitle.Text = _site.Title;    context.Dispose(); } private void loadlist() { using (SP.ClientContext _clientcontext = new SP.ClientContext(_context)) {    SP.Web _web = _clientcontext.Web;    SP.ListCollection _lists = _clientcontext.Web.Lists;    _clientcontext.Load(_lists);    _clientcontext.ExecuteQuery();    DataTable dt = new DataTable();    DataColumn column;    DataRow row;    column = new DataColumn();    column.DataType = Type.GetType("System.String");    column.ColumnName = "List Title";    dt.Columns.Add(column);    foreach (SP.List listitem in _lists)    {       row = dt.NewRow();       row["List Title"] = listitem.Title;       dt.Rows.Add(row);    }       dataGridView1.DataSource = dt;    } private void cmdload_Click(object sender, EventArgs e) { getsitetitle(); loadlist(); } } That's it. Running the application and clicking the Load Button will retrieve the Title of the Sharepoint site and display it on the TextBox and also it will retrieve ALL of the Sharepoint List on that site and populate the DataGridView with the List Title. Hope this helps. Thank you.

    Read the article

  • Getting App.config to be configuration specific in VS2010

    - by MarkPearl
    I recently wanted to have a console application that had configuration specific settings. For instance, if I had two configurations “Debug” and “Release”, depending on the currently selected configuration I wanted it to use a specific configuration file (either debug or config). If you are wanting to do something similar, here is a potential solution that worked for me. Setting up a demo app to illustrate the point First, let’s set up an application that will demonstrate the most basic concept. using System; using System.Configuration; namespace ConsoleSpecificConfiguration { class Program { static void Main(string[] args) { Console.WriteLine("Config"); Console.WriteLine(ConfigurationManager.AppSettings["Example Config"]); Console.ReadLine(); } } }   This does a really simple thing. Display a config when run. To do this, you also need a config file set up. My default looks as follows… <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="Example Config" value="Default"/> </appSettings> </configuration>   Your entire solution will look as follows… Running the project you will get the following amazing output…   Let’s now say instead of having one config file we want depending on whether we are running in “Debug” or “Release” for the solution configuration we want different config settings to be propagated across you can do the following… Step 1 – Create alternate config Files First add additional config files to your solution. You should have some form of naming convention for these config files, I have decided to follow a similar convention to the one used for web.config, so in my instance I am going to add a App.Debug.config and a App.Release.config file BUT you can follow any naming convention you want provided you wire up the rest of the approach to use this convention. My files look as follows.. App.Debug.config <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="Example Config" value="Debug"/> </appSettings> </configuration>   App.Release.config <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="Example Config" value="Release"/> </appSettings> </configuration>   Your solution will now look as follows… Step 2 – Create a bat file that will overwrite files The next step is to create a bat file that will overwrite one file with another. If you right click on the solution in the solution explorer there will be a menu option to add new items to the solution. Create a text file called “copyifnewer.bat” which will be our copy script. It’s contents should look as follows… @echo off echo Comparing two files: %1 with %2 if not exist %1 goto File1NotFound if not exist %2 goto File2NotFound fc %1 %2 /A if %ERRORLEVEL%==0 GOTO NoCopy echo Files are not the same. Copying %1 over %2 copy %1 %2 /y & goto END :NoCopy echo Files are the same. Did nothing goto END :File1NotFound echo %1 not found. goto END :File2NotFound copy %1 %2 /y goto END :END echo Done. Your solution should now look as follows…   Step 3 – Customize the Post Build event command line We now need to wire up everything – which we will do using the post build event command line in VS2010. Right click on your project and go to it’s properties We are now going to wire up the script so that when we build our project it will overwrite the default App.config with whatever file we want. The syntax goes as follows… call "$(SolutionDir)copyifnewer.bat" "$(ProjectDir)App.$(ConfigurationName).config" "$(ProjectDir)$(OutDir)\$(TargetFileName).config" Testing it If I now change my project configuration to Release   And then run my application I get the following output… Toggling between Release and Debug mode will show that the config file is changing each time. And that is it!

    Read the article

  • Making Puppet manifests/modules available to a wide audience

    - by Kyle Smith
    Our team rolled puppet out to our systems over the last six months. We're managing all sorts of resources, and some of them have sensitive data (database passwords for automated backups, license keys for proprietary software, etc.). Other teams want to get involved in the development of (or at least be able to see) our modules and manifests. What have other people done to continue to have secure data moving through Puppet, while sharing the modules and manifests with a larger audience?

    Read the article

  • Mysql server high trafic makes websites really slow or unable to load

    - by Holapress
    Lately we have been having a lot of problems with our mysql server, from websites being really slow or even unable to load them at all. The server is a dedicated server that only runs our mysql database. i have been running some test using a profiler (JetProfiler) and tool to stress test (loadUI). If I use loadUI to connect with 50 simultaneous connections to one of our websites that runs a resently big query it will already make the website be unable to load. One of the things that makes me worried is that when I look at Jetprofile it always shows a Treads_connected of 1.00 and it seems that when it hits around 2.00 that I'm unable to connect. The 3 big peaks are when I run a test with loadUI, first one was 15 simultaneous connections wich made it still able for me to load the website but just really slow, the second one was 40 simultaneous connections which already made it impossible to load and the third one was with 100 connection which also didn't make it load anymore. Another thing that worries me is that in JetProfiler it says all the queries that get used are full table scans, could this maybe be the problem? The website I run as a test runs 3 queries, one for a menu that outputs around 1000 rows, one for the adds that has around 560 rows and a big one to get posts that has around 7000 rows (see screenshot bellow) I also have monitored the cpu of the server and there seems to be no problem there, even when I make a lot of connections with loadui the cpu stays low. I can't seem to figure out what is the main cause of the websites being unable to load when there is a high amount of traffic, if anyone has other suggestions for testing or something that might cause the problem please let me know.

    Read the article

  • Tomcat 6 going down after reaching its maximum number of threads

    - by user73628
    Our Tomcat 6.0.29 goes down after reaching its maximum number of Threads. I would really appreciate any help with it because it is a production server. Here is part of the catalina.log file: INFO: Maximum number of threads (600) created for connector with address null and port 80 Mar 8, 2011 11:19:37 AM org.apache.coyote.http11.Http11Protocol pause INFO: Pausing Coyote HTTP/1.1 on http-80 Mar 8, 2011 11:19:38 AM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina Mar 8, 2011 11:19:38 AM org.apache.catalina.core.StandardWrapper unload INFO: Waiting for 8 instance(s) to be deallocated

    Read the article

  • Windows Server 2008 R2 backup includes volume with MSSQL data

    - by J F
    I'm using wbadmin to schedule image backup every night on a Windows Server 2008 R2 Standard server. Ever since installing MS-SQL 2008 Express R2, wbadmin wants to also backup the volume where the MS-SQL data files are located (L:). I'm using -allCritical to make sure bare metal restore will work. command-line: wbadmin start backup -backupTarget:\\myserver\backup$\myserver\%DATE% -include:C: -allCritical -quiet I don't want to do this, because I'm backing up MS-SQL manually elsewhere. It worked just fine only taking C: before I installed MS-SQL.

    Read the article

  • Httpd + Expect Script Fail (no more ptys) if httpd is not run through cli

    - by Apostolis
    I have a CentOS virtual server through Vmware. The server runs an httpd daemon which serves an php page with a form. The users complete the form, and by clicking submit the php page calls an expect scripts. If i run the httpd throught the default init.d script i get a "no more ptys" error, but if i run httpd through root terminal the script runs without problems. How can i make the httpd run the expect scripts without having to run the httpd daemon by hand.

    Read the article

  • Multiple Apps - One SSL

    - by Optix App Development
    I'm trying to configure a domain and SSL to run multiple Facebook apps through the SSL. What I need advice on is routing the apps through the SSL without actually hosting them on that server. Ideally they would be hosted on the client's server. Any advice on how to do this? UPDATE Following the advice from the replies I have setup a domain which houses my Facebook apps under one SSL. So far this is working well. Thanks guys. :)

    Read the article

  • Active Directory Restricted Group confusion

    - by pepoluan
    I am trying to implement Restricted Group policy for my company's AD infrastructure, namely standardizing the local "Administrators" group. The documentation (and various webpages) said that the "Members of this group" policy will wipe out the "Administrators" group. However, an experiment made me confused: I created 2 GPOs: GPO-A replaces the Local Administrators with a list of domain users (e.g., "Alice" and "Bob") GPO-B inserts a domain user (e.g., "Charlie" -- not part of GPO A) into the Local Administrators Experiment 1: GPO-A gets applied first (link order 2) Everything happens as expected: GPO-A cleans out Local Admins and add "Alice" & "Bob" gets added; GPO-B adds "Charlie". Experiment 2: GPO-B is applied first What happens: "Charlie" gets added to the Local Admins group (which also contains 2 local users) The local users on the PC gets deleted, and "Alice" and "Bob" gets added. Result: Local Admins contain "Alice", "Bob", and "Charlie" My confusion: In Experiment 2, I thought GPO-A will totally erase the Local Admins group, including users added by GPO-B (since GPO-A gets applied after GPO-B). As it happens, it only erase local users from the Local Admins, but keeps the domain users. So, is that the way it should be? Or am I doing something incorrectly?

    Read the article

  • large RAID 10 vs small RAID1

    - by user116399
    The machine will store and serve millions of small files (<15Kb each), and all those files require a total storage space of 400G Considering the exact same SATA hard drives maker and models, on the exact same environment (OS, cpu, ram, raid controller, etc...) which one of the setups bellow would be faster? A) RAID 1 with 2 drives of 2T each, making up total storage of 2T B) RAID 10 with 4 drives of 2T each, making up total storage of 4T [EDIT]: I'm aware RAID10 is faster than RAID1. The larger the disk, at least in theory, the longer will take to do seeks/writes. So, will the performance gain of RAID10 will be outweighed by the "drag" caused the larger disk area when seek/write operations happened?

    Read the article

  • Apache not finding index.php by default, set rule for routing through index.php

    - by eoinoc
    Apache on the server is set to find index.php by default, and that works for a normal folder. However, I have a .htaccess rule to route all requests through my routing script: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php [QSA,L] With these .htaccess contents, the server returns a 404 error. Only by specifying /index.php does the routing script get called. Any tips on what I am doing wrong?

    Read the article

  • GPO startup script not copying files

    - by marcwenger
    I created a GPO startup script to execute for computers in a specific AD container. The script takes a file from the AD netlogon share and places it on a directory on the computer. Given the right permissions (ie: myself) can execute the script just fine and the file copies. But it doesn't work on startup - the file does not copy over from the AD server. The startup script should run as localsystem (am I right?). So the question is why do the files not copy on startup? Could it be because of: Is it permissions of the local system user? Reading the registry is problematic on startup? Obtaining files from the AD netlogon folder is problematic on startup? Am I missing it completely? My test machine does have the registry key and local directories as described in the script. I myself have standard user permissions on the test machine. AD server is Windows 2008, test client is Windows XP SP3 (and soon to be Windows 7, which I assume permissions issues will be inevitable) Dim wShell, fso, oraHome, tnsHome, key, srcDir Set wShell = WScript.CreateObject("WScript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") key = "HKLM\Software\Oracle\Oracle_Home" On Error Resume Next orahome = wShell.RegRead(key) If err.Number = 0 Then tnsHome = oraHome + "\" + "network\admin\" srcDir = wShell.ExpandEnvironmentStrings("%logonserver%") + "\netlogon\UpdatedFiles\" fso.CopyFile srcDir + "file1.ext", tnsHome, true End If Side note: To ensure that the script is properly deployed, I purposely put some errors in the script, and on the next startup the error message appeared. So I know the GPO is deployed properly.

    Read the article

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