Daily Archives

Articles indexed Friday September 21 2012

Page 14/19 | < Previous Page | 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Variable for the field name of mysql row result

    - by ana
    I'm retrieving a row with php from mysql and it has fields like: name_en, name_es, name_de... I want to retrieve the right field base on my $lang variable (en, es, de...). If the $lang variable is 'es', I'd need to get $row['name_es']. I've tried this (based on this thread), but it's not working: $name = $row->{'name_'.$lang}; Any idea how can I use a variable as the name of the field of a row? Thanks in advance for your help!

    Read the article

  • Mixing AJAX requests with Flash scope objects not working

    - by AlanObject
    I have a JSF page that displays a table from an object called TableQuery that supports stateful pagination, sorting, etc. The bean that accesses the object is a RequestScoped object, and it attempts to preserve the TableQuery by storing it the flash map. The accessor method looks like this: public TableQuery<SysLog> getQuery() { if (query != null) return query; Flash flash = FacesContext.getCurrentInstance(). getExternalContext().getFlash(); query = (TableQuery) flash.get("Query"); if (query != null) System.out.println("TableSysLog.getQuery() Got query from flash!"); if (query == null) { query = slc.getNewTableQuery(); System.out.println("TableSysLog.getQuery() Created new query"); } flash.put("Query", query); return query; } The Links to go between pages are implemented with *p:commandLInk*s. I use Primefaces command link in AJAX mode so just the link gets processed when it is clicked. The action listener looks like this: public void doNextPage(ActionEvent evt) { getQuery().doNextPage(); } When it doesn't work I get the error message: WARNING: JSF1095: The response was already committed by the time we tried to set the outgoing cookie for the flash. Any values stored to the flash will not be available on the next request. I found this thread when looking up this problem. When I turned of HTTP chunking as the article suggests, the error message went away but the problem remained. Does anyone know what is going on and how this might be fixed?

    Read the article

  • undefined method `new_record?' for nil:NilClass

    - by TopperH
    In rails 3.2 I created a post controller. Each post can have a different number of paperclip attachments. To achieve this I created a assets model where each asset has a paperclip attachment. One post has_many assets and assets belong_to post. Asset model class Asset < ActiveRecord::Base belongs_to :post has_attached_file :photo, :styles => { :thumb => "200x200>" } end Post model class Post < ActiveRecord::Base attr_accessible :content, :title has_many :assets, :dependent => :destroy validates_associated :assets after_update :save_assets def new_asset_attributes=(asset_attributes) asset_attributes.each do |attributes| assets.build(attributes) end end def existing_asset_attributes=(asset_attributes) assets.reject(&:new_record?).each do |asset| attributes = asset_attributes[asset.id.to_s] if attributes asset.attributes = attributes else asset.delete(asset) end end end def save_assets assets.each do |asset| asset.save(false) end end end Posts helper module PostsHelper def add_asset_link(name) link_to_function name do |post| post.insert_html :bottom, :assets, :partial => 'asset', :object => Asset.new end end end Form for post <%= form_for @post, :html => { :multipart => true } do |f| %> <% if @post.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:</h2> <ul> <% @post.errors.full_messages.each do |msg| %> <li><%= msg %></li> <% end %> </ul> </div> <% end %> <div class="field"> <%= f.label :title %><br /> <%= f.text_field :title %> </div> <div class="field"> <%= f.label :content %><br /> <%= f.text_area :content %> </div> <div id="assets"> Attach a file or image<br /> <%= render 'asset', :collection => @post.assets %> </div> <div class="actions"> <%= f.submit %> </div> <% end %> Asset partial <div class="asset"> <% new_or_existing = asset.new_record? ? 'new' : 'existing' %> <% prefix = "post[#{new_or_existing}_asset_attributes][]" %> <% fields_for prefix, asset do |asset_form| -%> <p> Asset: <%= asset_form.file_field :photo %> <%= link_to_function "remove", "$(this).up('.asset').remove()" %> </p> <% end -%> </div> Most of the code is taken from here: https://gist.github.com/33011 and I understand this is a rails2 app, anyway I don't understand what this error means: undefined method `new_record?' for nil:NilClass Extracted source (around line #2): 1: <div class="asset"> 2: <% new_or_existing = asset.new_record? ? 'new' : 'existing' %> 3: <% prefix = "post[#{new_or_existing}_asset_attributes][]" %> 4: 5: <% fields_for prefix, asset do |asset_form| -%>

    Read the article

  • Jquery only works the first time

    - by Tripping
    I am trying to teach myself general web development skills. I am trying to create a image upload with preview functionality using HTML5 FileAPI. Till now, I have created a file input which shows the preview of image when selected. Html mark up is below: <div> <!-- Photos --> <fieldset> <legend>PropertyPhotos</legend> <div class="upload-box" id="upload-box-1"> <div class="preview-box"> <img alt="Field for image cutting" id="preview_1" src="@Url.Content("~/Content/empty.png")" /> </div> <div> @Html.FileFor(model => model.File1) @Html.ValidationMessageFor(model => model.File1) </div> </div> <div class="upload-box" id="upload-box-2"> <div class="preview-box"> <img alt="Field for image cutting" id="preview_2" src="@Url.Content("~/Content/empty.png")" /> </div> <div> @Html.FileFor(model => model.File2) @Html.ValidationMessageFor(model => model.File2) </div> </div> <div class="upload-box" id="upload-box-3"> <div class="preview-box"> <img alt="Field for image cutting" id="preview_3" src="@Url.Content("~/Content/empty.png")" /> </div> <div> @Html.FileFor(model => model.File3) @Html.ValidationMessageFor(model => model.File3) </div> </div> </fieldset> </div> The Jquery to show preview and then display the next "upload-box" is as follows: <script type="text/javascript"> $(document).ready(function () { // show first box $("#upload-box-1").fadeIn(); //Get current & next step index var stepNum = $('div.upload-box').attr('id').replace(/[^\d]/g, ''); var nextNum = parseInt(stepNum)+1; //Get the preview image tag var preview = $('#preview_'+stepNum); //Load preview on file tag change and display second upload-box $('#File'+stepNum).change(function (evt) { var f = evt.target.files[0]; var reader = new FileReader(); if (!f.type.match('image.*')) { alert("The selected file does not appear to be an image."); return; } reader.onload = function (e) { preview.attr('src', e.target.result); }; reader.readAsDataURL(f); //Show next upload-box $("#upload-box-" + nextNum).fadeIn(); }); }); </script> However, this code only first for the first time ... i.e. on selecting a file - It shows a preview and then shows the next "upload-box". However, when I browse using the second file it doesn't show any preview. From what I have ready, I need to close the Jquery function so that it can be initialised again but I am not sure how to do that. Any help will be grateful.

    Read the article

  • How to run a program in python?

    - by Luka Mihaldinec
    this is my code. I'm trying to make a script which would run an .exe file from my computer. And this one isn't working :/ I think I'm using the wrong command.. I tried all the other commands like import os, os.startfile, but they won't work too. I think my code is just wrong :P loop=0 while loop==0: answer=raw_input("coded by: Narralol\n\n" "Pick a task:\n" "1) Start Minecraft.exe\n" "2) Start Minecraft_Server.jar\n" "3) Backup your server\n" "4) Copy the backup to your desktop\n" "5) Exit\n") if answer==1: execfile('D:\Games\Minecraft\Minecraft.exe') elif answer==2: execfile('D:\Games\Minecraft\Minecraft_server.jar') elif answer==5: loop=1

    Read the article

  • C# Dynamic Query Without A Database Model

    - by hitopp
    I have been searching the web for a solution to dynamic queries. I have found many different solutions (e.g. Linq to Sql, Dynamic Linq Expressions, Dynamic Query), but all of these solutions involve some sort of previous knowledge of the database (like a model in code). Maybe what I am asking is way off the deep end, but is there any possible way to dynamically query a database without a model? For example, a database has a Customers table with the following columns: CustomerID Name FavoriteColor I want to create a query as SELECT Name FROM Customers WHERE @0 = @1, where the two placeholders are populated dynamically. The resulting data does not tie to a model class and I would prefer to use some sort of framework to build the queries, not simple string concatenation. The System.Linq.Dynamic namespace came really close to fulfilling this request, but it uses a database model. I realize this is crazy, but I was just curious.

    Read the article

  • Second user-defined function returns garbage value?

    - by mintyfresh
    I have been teaching myself C programming, and I've come to a difficult point with using variables across functions. When, I compile this program and run it, the function askBirthYear returns the correct value, but sayAgeInYears returns either 0 or a garbage value. I believe it has something to do with how I used the variable birthYear, but I'm stumped on how to fix the issue. Here is the code: #include <stdio.h> #include <stdlib.h> int askBirthYear(int); void sayAgeInYears(int); int birthYear; int main(void) { askBirthYear(birthYear); sayAgeInYears(birthYear); return EXIT_SUCCESS; } void askBirthYear(int birthYear) { printf("Hello! In what year were you born?\n"); scanf("%d", &birthYear); printf("Your birth year is %d.\n", birthYear); return birthYear; } void sayAgeInYears(int birthYear) { int age; age = 2012 - birthYear; printf("You are %d years old.\n", age); }

    Read the article

  • excel vba moving non-contiguous range selection to an array

    - by Russ Urquhart
    In the situation where the user select two non-contiguous column ranges i wrote the following: Dim count long Dim points variant Dim i long Set user_range = ActiveWindow.RangeSelection count = user_range.count / 2 ReDim points(1 To count, 1 To 2) For i = 1 To count MsgBox "value is" & user_range.Areas.Item(1).Value(i,1) points(i, 1) = user_range.Areas.Item(1).Value(i,1) points(i, 2) = user_range.Areas.Item(2).Value(i,1) Next i But i get an object error when i try this. Am i indexing Value wrong? This should work right? Is there an easier way to do this? Any help is greatly appreciated! Thanks, Russ

    Read the article

  • Extract new image dimensions from timthumb

    - by jonthoughtit
    I'm using timthumb to resize my images because it scales them nicely if I only enter one of the dimensions. However I want to know if it's possible to extract the new resized image's dimensions so that I can add that dynamically to the img tag attributes. I tried this with no luck: $fullpath = '/lib/timthumb.php?src='.$image.'&w=100'; $my_image = array_values(getimagesize($fullpath)); list($width, $height, $type, $attr) = $my_image; Any ideas?

    Read the article

  • jQuery programmatically removing validation highlighting

    - by Sam Carleton
    The form has two check boxes (cbDeclined & cbIsOOfFac), two text fields and a drop down (txtHeight, txtWeight, ddlDevice). If either check box is checked, then the other controls are disabled and the rules for the other do no apply. Here are the current rules: $('form').validate({ highlight: function (element, errorClass) { $(element).addClass("invalidElem"); }, unhighlight: function (element, errorClass) { $(element).removeClass("invalidElem"); }, errorPlacement: function (error, element) { var parent = element.parent(); parent.append(error); }, errorElement: "div", errorClass: "errorMsg" }); function HeightWeightCtrlsEnabled() { return !cbDeclined.is(':checked') && !cbIsOOfFac.is(':checked'); } txtHeight.rules("add", { required: function (element) { return HeightWeightCtrlsEnabled(); }, maxlength: 3, min: 1, digits: true }); txtWeight.rules("add", { required: function (element) { return HeightWeightCtrlsEnabled(); }, maxlength: 4, min: 1, digits: true }); ddlDevice.rules("add", { required: function (element) { return HeightWeightCtrlsEnabled(); } }); function UpdateTextBoxes() { var disableCtrls = !HeightWeightCtrlsEnabled(); txtHeight.prop('disabled', disableCtrls); txtWeight.prop('disabled', disableCtrls); ddlDevice.prop('disabled', disableCtrls); if (disableCtrls) { txtHeight.val(''); txtWeight.val(''); ddlDevice.val(''); } } cbDeclined.click(function () { if (cbDeclined.is(':checked')) cbIsOOfFac.attr('checked', false); UpdateTextBoxes(); }); cbIsOOfFac.click(function () { if (cbIsOOfFac.is(':checked')) cbDeclined.attr('checked', false); UpdateTextBoxes(); }); The problem comes in when: The user enters something into txtWeight, clicks the submit to get both ddlDevice & txtHeight to highlight because they are required, then... The user clicks on either cbDeclined & cbIsOOfFac. The highlight is NOT going away. I am trying to figure out how to get the highlighting around the height and drop down to go away. I tried to create a fully working jsFiddler, but I cannot get anything to work, though everything looks correct. here is the link (I cannot post links, so I expanded it a bit) jsfiddle dot net/scarleton/9hDZQ/12/ If you remove the last /12/, you will see my first version that is a cut/paste from the real thing. Per a suggestion I tried adding $('form').valid(); a number of places. When I added it to the end of the UpdateTextBoxes() function, they started out highlighted, not what I want. When I added it after the click() event of either of the radio button, the text would go away, but the actual controls stayed highlighted. It looks like the function on the required property of the rule is not fully working, maybe. What is really interesting is this: When I enter a height, click , then weight and device are highlighted and have the error message under them. When I click on one of the radio buttons, the text goes away, but the highlight does not. But... The height is NOT highlighted, it stays normal.

    Read the article

  • Scope of the c++ using directive

    - by ThomasMcLeod
    From section 7.3.4.2 of the c++11 standard: A using-directive specifies that the names in the nominated namespace can be used in the scope in which the using-directive appears after the using-directive. During unqualified name lookup (3.4.1), the names appear as if they were declared in the nearest enclosing namespace which contains both the using-directive and the nominated namespace. [ Note: In this context, “contains” means “contains directly or indirectly”. —end note ] What do the second and third sentences mean exactly? Please give example. Here is the code I am attempting to understand: namespace A { int i = 7; } namespace B { using namespace A; int i = i + 11; } int main(int argc, char * argv[]) { std::cout << A::i << " " << B::i << std::endl; return 0; } It print "7 7" and not "7 18" as I would expect. Sorry for the typo, the program actually prints "7 11".

    Read the article

  • NetBeans Development 7 - Windows 7 64-bit … JNI native calls ... a how to guide

    - by CirrusFlyer
    I provide this for you to hopefully save you some time and pain. As part of my expereince in getting to know NB Development v7 on my Windows 64-bit workstation I found another frustrating adventure in trying to get the JNI (Java Native Interface) abilities up and working in my project. As such, I am including a brief summary of steps required (as all the documentation I found was completely incorrect for these versions of Windows and NetBeans on how to do JNI). It took a couple of days of experimentation and reviewing every webpage I could find that included these technologies as keyword searches. Yuk!! Not fun. To begin, as NetBeans Development is "all about modules" if you are reading this you probably have a need for one, or more, of your modules to perform JNI calls. Most of what is available on this site or the Internet in general (not to mention the help file in NB7) is either completely wrong for these versions, or so sparse as to be essentially unuseful to anyone other than a JNI expert. Here is what you are looking for ... the "cut to the chase" - "how to guide" to get a JNI call up and working on your NB7 / Windows 64-bit box. 1) From within your NetBeans Module (not the host appliation) declair your native method(s) and make sure you can compile the Java source without errors. Example: package org.mycompanyname.nativelogic; public class NativeInterfaceTest { static { try { if (System.getProperty( "os.arch" ).toLowerCase().equals( "amd64" ) ) System.loadLibrary( <64-bit_folder_name_on_file_system>/<file_name.dll> ); else System.loadLibrary( <32-bit_folder_name_on_file_system>/<file_name.dll> ); } catch (SecurityException se) {} catch (UnsatisfieldLinkError ule) {} catch (NullPointerException npe) {} } public NativeInterfaceTest() {} native String echoString(String s); } Take notice to the fact that we only load the Assembly once (as it's in a static block), because othersise you will throw exceptions if attempting to load it again. Also take note of our single (in this example) native method titled "echoString". This is the method that our C / C++ application is going to implement, then via the majic of JNI we'll call from our Java code. 2) If using a 64-bit version of Windows (which we are here) we need to open a 64-bit Visual Studio Command Prompt (versus the standard 32-bit version), and execute the "vcvarsall" BAT file, along with an "amd64" command line argument, to set the environment up for 64-bit tools. Example: <path_to_Microsoft_Visual_Studio_10.0>/VC/vcvarsall.bat amd64 Take note that you can use any version of the C / C++ compiler from Microsoft you wish. I happen to have Visual Studio 2005, 2008, and 2010 installed on my box so I chose to use "v10.0" but any that support 64-bit development will work fine. The other important aspect here is the "amd64" param. 3) In the Command Prompt change drives \ directories on your computer so that you are at the root of the fully qualified Class location on the file system that contains your native method declairation. Example: The fully qualified class name for my natively declair method is "org.mycompanyname.nativelogic.NativeInterfaceTest". As we successfully compiled our Java in Step 1 above, we should find it contained in our NetBeans Module something similar to the following: "/build/classes/org/mycompanyname/nativelogic/NativeInterfaceTest.class" We need to make sure our Command Prompt sets, as the current directly, "/build/classes" because of our next step. 4) In this step we'll create our C / C++ Header file that contains the JNI required statments. Type the following in the Command Prompt: javah -jni org.mycompanyname.nativelogic.NativeInterfaceTest and hit enter. If you receive any kind of error that states this is an unrecognized command that simply means your Windows computer does not know the PATH to that command (it's in your /bin folder). Either run the command from there, or include the fully qualified path name when invoking this application, or set your computer's PATH environmental variable to include that path in its search. This should produce a file called "org_mycompanyname_nativelogic_NativeInterfaceTest.h" ... a C Header file. I'd make a copy of this in case you need a backup later. 5) Edit the NativeInterfaceTest.h header file and include an implementation for the echoString() method. Example: JNIEXPORT jstring JNICALL Java_org_mycompanyname_nativelogic_NativeInterfaceTest_echoString (JNIEnv *env, jobject jobj, jstring js) { return((*env)->NewStringUTF(env, "My JNI is up and working after lots of research")); } Notice how you can't simply return a normal Java String (because you're in C at the moment). You have to tell the passed in JVM variable to create a Java String for you that will be returned back. Check out the following Oracle web page for other data types and how to create them for JNI purposes. 6) Close and Save your changes to the Header file. Now that you've added an implementation to the Header change the file extention from ".h" to ".c" as it's now a C source code file that properly implements the JNI required interface. Example: NativeInterfaceTest.c 7) We need to compile the newly created source code file and Link it too. From within the Command Prompt type the following: cl /I"path_to_my_jdks_include_folder" /I"path_to_my_jdks_include_win32_folder" /D:AMD64=1 /LD NativeInterfaceTest.c /FeNativeInterfaceTest.dll /link /machine:x64 Example: cl /I"D:/Program Files/Java/jdk1.6.0_21/include" /I"D:/Program Files/java/jdk1.6.0_21/include/win32" /D:AMD64=1 /LD NativeInterfaceTest.c /FeNativeInterfaceTest.dll /link /machine:x64 Notice the quotes around the paths to the 'include" and 'include/win32' folders is required because I have spaces in my folder names ... 'Program Files'. You can include them if you have no spaces without problems, but they are mandatory if you have spaces when using a command prompt. This will generate serveral files, but it's the DLL we're interested in. This is what the System.loadLirbary() java method is looking for. 8) Congratuations! You're at the last step. Simply take the DLL Assembly and paste it at the following location: <path_of_NetBeansProjects_folder>/<project_name>/<module_name>/build/cluster/modules/lib/x64 Note that you'll probably have to create the "lib" and "x64" folders. Example: C:\Users\<user_name>\Documents\NetBeansProjects\<application_name>\<module_name>\build\cluster\modules\lib\x64\NativeInterfaceTest.dll Java code ... notice how we don't inlude the ".dll" file extension in the loadLibrary() call? System.loadLibrary( "/x64/NativeInterfaceTest" ); Now, in your Java code you can create a NativeInterfaceTest object and call the echoString() method and it will return the String value you typed in the NativeInterfaceTest.c source code file. Hopefully this will save you the brain damage I endured trying to figure all this out on my own. Good luck and happy coding!

    Read the article

  • Dynamic columns in C# rdlc report

    - by Mugume David
    Suppose I have a report that lists employees (as rows) with their respective taxes charged (in columns). It is possible for a new tax to come up. Since my rdlc report file is currently designed (from XML of-course) to statically generate the coulumns. A future shift in events will need me to alter the rdlc file and add in a new column. how can i do this dynamically. I intend to avoid opening the rdlc file and adding XML code.

    Read the article

  • Could not initialize proxy - No Session again

    - by Iapilgrim
    I get these error log when viewing a page ERROR [TP-Processor11] (LazyInitializationException.java:42) - could not initialize proxy - no Session org.hibernate.LazyInitializationException: could not initialize proxy - no Session at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:132) at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:174) at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190) at org.osmoz.contents.model.enm.ContentType_$$_javassist_71.getDefaultShortMode(ContentType_$$_javassist_71.java) at org.osmoz.contents.web.tapestry.components.EnmContentZone.getTemplate(EnmContentZone.java:67) at org.osmoz.contents.web.tapestry.base.AbstractRawContentZone.getContent(AbstractRawContentZone.java:67) at $PropertyConduit_1276091af82.get($PropertyConduit_1276091af82.java) at org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:58) at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl$1.read(InternalComponentResourcesImpl.java:510) at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl$1.read(InternalComponentResourcesImpl.java:496) at org.apache.tapestry5.corelib.components.OutputRaw._$read_parameter_value(OutputRaw.java) at org.apache.tapestry5.corelib.components.OutputRaw.beginRender(OutputRaw.java:43) at org.apache.tapestry5.corelib.components.OutputRaw.beginRender(OutputRaw.java) at I know the problem is Session has been closed. But I really don't know why this error occur not so often that why I don't know the root cause is. Enviroment: Tapestry5, JPA, Hibernate 3.3.2.GA I've set <filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class> in web.xml also

    Read the article

  • Movilidad y el modelo de computación en la nube como el actual paradigma tecnológico

    Movilidad y el modelo de computación en la nube como el actual paradigma tecnológico En este programa presentaremos una visión general de las oportunidades tecnológicas que favorecen la generación de emprendimientos regionales desde el equipo de relaciones para desarrolladores de la región de sur de Latinoamérica. Trataremos escenarios tecnológicos y principalmente el impacto de la movilidad y el modelo de computación en la nube, finalmente analizaremos las oportunidades más importantes junto a diversos referentes regionales. Tecnología, desafíos, opiniones y todo el ecosistema representado por la pasión y el talento regional. From: GoogleDevelopers Views: 0 0 ratings Time: 00:00 More in Education

    Read the article

  • Plataforma social Google+ innovación para desarrolladores

    Plataforma social Google+ innovación para desarrolladores En este programa presentaremos una visión general de las novedades tecnológicas desde el equipo de relaciones para desarrolladores de la región de sur de Latinoamérica. Seguiremos presentando nuestro enfoque de desarrollo, ingeniería y las mejores prácticas para implementar tecnología Google favoreciendo la evolución de soluciones tecnológicas. Luego nos introduciremos en un escenario técnico en donde analizaremos la solución de social de Google+ para desarrolladores, opciones y posibilidad de innovar en este ecosistema. Finalmente estaremos conversando con la comunidad de desarrollo, resolviendo un desafío técnico y premiando todo el talento regional. From: GoogleDevelopers Views: 0 0 ratings Time: 00:00 More in Education

    Read the article

  • Oracle 64-bit assembly throws BadImageFormatException when running unit tests

    - by pjohnson
    We recently upgraded to the 64-bit Oracle client. Since then, Visual Studio 2010 unit tests that hit the database (I know, unit tests shouldn't hit the database--they're not perfect) all fail with this error message:Test method MyProject.Test.SomeTest threw exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format.I resolved this by changing the test settings to run tests in 64-bit. From the Test menu, go to Edit Test Settings, and pick your settings file. Go to Hosts, and change the "Run tests in 32 bit or 64 bit process" dropdown to "Run tests in 64 bit process on 64 bit machine". Now your tests should run.This fix makes me a little nervous. Visual Studio 2010 and earlier seem to change that file for no apparent reason, add more settings files, etc. If you're not paying attention, you could have TestSettings1.testsettings through TestSettings99.testsettings sitting there and never notice the difference. So it's worth making a note of how to change it in case you have to redo it, and being vigilant about files VS tries to add.I'm not entirely clear on why this was even a problem. Isn't that the point of an MSIL assembly, that it's not specific to the hardware it runs on? An IL disassembler can open the Oracle.DataAccess.dll in question, and in its Runtime property, I see the value "v4.0.30319 / x64". So I guess the assembly was specifically build to target 64-bit platforms only, possibly due to a 64-bit-specific difference in the external Oracle client upon which it depends. Most other assemblies, especially in the .NET Framework, list "msil", and a couple list "x86". So I guess this is another entry in the long list of ways Oracle refuses to play nice with Windows and .NET.If this doesn't solve your problem, you can read others' research into this error, and where to change the same test setting in Visual Studio 2012.

    Read the article

  • Automatically Reset Theme To Default, SharePoint 2010

    - by KunaalKapoor
    Manually/Through UIOn the top link bar, click Site Settings.On the Site Management page, in the Customization section, click Apply theme to site.On the Apply Theme to Web Site page, select No Theme(Default) from the list.Click Apply.Through Scriptfunction Apply-SPDefaultTheme([string]$SiteUrl, [string]$webName){$site = new-object Microsoft.SharePoint.SPSite($SiteUrl)$web = $site.OpenWeb($webName)$theme = [Microsoft.SharePoint.Utilities.ThmxTheme]::RemoveThemeFromWeb($web,$false)$web.Update()$web.Dispose()$site.Dispose()}After looking in the SPTHEMES.XML file found in the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033 folder, you do see there is a theme with a theme name of "none". Since there is no "default" theme in 2010. So make sure if you wanna reset it to default you know that there is no default, you need to select 'none' :)

    Read the article

  • Free Windows Store and Phone Developer Accounts for MSDN Subscribers

    - by Clint Edmonson
    If you are a member/subscriber to any of the following programs you are eligible to receive one-time, 12-month Windows Store and Windows Phone developer accounts.  Visual Studio Professional with MSDN Visual Studio Test Professional with MSDN Visual Studio Premium with MSDN Visual Studio Ultimate with MSDN BizSpark On September 11, 2012 Microsoft announced that Windows Store is open to individual developers (Company only registration became available on August 1st). This means that eligible MSDN subscribers will be able to select between an individual and company account when registering for their developer account benefit.   New or existing subscribers will see developer accounts listed as a benefit on the Getting Started page as well as various MSDN overview pages. Now that you have this benefit why not get started.  To activate this benefit, subscribers are provided with a unique token for each of the developer accounts. The tokens will work for both individual and company registration. To acquire and redeem the token: 1. Log into My Account. 2. Click on ‘Get Code’. A unique token will be delivered to each subscriber. 3. Click on ‘How to Register’ (link will appear once code is claimed). A developer account details page will display that includes an overview of the benefit, token and registration information. 4. Click on the link to ‘Register your code’.  This launches the developer account registration process. Ready to start developing?  Head over to Generation App to get started.

    Read the article

  • Performance: Nginx SSL slowness or just SSL slowness in general?

    - by Mauvis Ledford
    I have an Amazon Web Services setup with an Apache instance behind Nginx with Nginx handling SSL and serving everything but the .php pages. In my ApacheBench tests I'm seeing this for my most expensive API call (which cache via Memcached): 100 concurrent calls to API call (http): 115ms (median) 260ms (max) 100 concurrent calls to API call (https): 6.1s (median) 11.9s (max) I've done a bit of research, disabled the most expensive SSL ciphers and enabled SSL caching (I know it doesn't help in this particular test.) Can you tell me why my SSL is taking so long? I've set up a massive EC2 server with 8CPUs and even applying consistent load to it only brings it up to 50% total CPU. I have 8 Nginx workers set and a bunch of Apache. Currently this whole setup is on one EC2 box but I plan to split it up and load balance it. There have been a few questions on this topic but none of those answers (disable expensive ciphers, cache ssl, seem to do anything.) Sample results below: $ ab -k -n 100 -c 100 https://URL This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking URL.com (be patient).....done Server Software: nginx/1.0.15 Server Hostname: URL.com Server Port: 443 SSL/TLS Protocol: TLSv1/SSLv3,AES256-SHA,2048,256 Document Path: /PATH Document Length: 73142 bytes Concurrency Level: 100 Time taken for tests: 12.204 seconds Complete requests: 100 Failed requests: 0 Write errors: 0 Keep-Alive requests: 0 Total transferred: 7351097 bytes HTML transferred: 7314200 bytes Requests per second: 8.19 [#/sec] (mean) Time per request: 12203.589 [ms] (mean) Time per request: 122.036 [ms] (mean, across all concurrent requests) Transfer rate: 588.25 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 65 168 64.1 162 268 Processing: 385 6096 3438.6 6199 11928 Waiting: 379 6091 3438.5 6194 11923 Total: 449 6264 3476.4 6323 12196 Percentage of the requests served within a certain time (ms) 50% 6323 66% 8244 75% 9321 80% 9919 90% 11119 95% 11720 98% 12076 99% 12196 100% 12196 (longest request)

    Read the article

  • Cannot reactivate RAID-5 volume: The size of the plex member is invalid

    - by Ian Boyd
    We had a 3-drive Windows Server 2008 R2 RAID-5 fail (operating in redundancy mode): WDC 1 TB WDC 1 TB WDC 1 TB We removed the failed hard drive, and put a WDC 1 TB drive (that we had standing by) into the machine. When launched, Disk Manager, asked permission to "initialize" the disk as either: Master Boot Record (MBR) Guid Partition Table (GPT) We initialized the disk as GPT, converted it to dynamic, and tried to use the Repair Volume command - except it was greyed out. (which is a terrifying thing on a failed production server hosting 3 virtual servers) i tried from the diskpart command line tool. First we look for our RAID-5 volume that is in Failed Rd mode: DISKPART> list volume Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 0 E VMs (Raid5) NTFS RAID-5 1863 GB Failed Rd Volume 1 D DVD-ROM 0 B No Media Volume 2 System Rese NTFS Partition 100 MB Healthy System Volume 3 C NTFS Partition 1862 GB Healthy Boot There, Volume 0. Make that our active context: DISKPART> select volume 0 Volume 0 is the selected volume. Now we need to find the disk we will be repairing the volume with: DISKPART> list disk Disk ### Status Size Free Dyn Gpt -------- ------------- ------- ------- --- --- Disk 0 Online 931 GB 0 B * Disk 1 Online 931 GB 931 GB * Disk 2 Online 1863 GB 0 B Disk 3 Online 931 GB 0 B * Disk M0 Missing 0 B 0 B * The disk with 931 GB free, Disk 1. Now we just need to repair the volume: DISKPART> repair disk=1 Virtual Disk Service error: The size of the plex member is invalid.

    Read the article

  • Testlink stop working when configuring it to use LDAP

    - by YuriAlbuquerque
    I have a TestLink webservice running on a server, and OpenLDAP running on other server. There are no firewall problems between them (I managed to configure Redmine, on the same server as TestLink, to use LDAP authentication). But whenever I place the configuration for LDAP in TestLink, TestLink stops working. I have no clue on what is happening. This is where I define LDAP's settings on custom_config.inc.php: $tlCfg->authentication['method'] = 'LDAP'; $tlCfg->authentication['ldap_server'] = 'serverip'; $tlCfg->authentication['ldap_port'] = '389'; $tlCfg->authentication['ldap_version'] = '2'; $tlCfg->authentication['ldap_root_dn'] = 'dc=mycompany,dc=com,dc=br'; $tlCfg->ldap_organization'] = ''; $tlCfg->authentication['ldap_uid_field'] = 'uid'; $tlCfg->authentication['ldap_bind_dn'] = 'myuser'; //Not actual login name and password, for obvious reasons $tlCfg->authentication['ldap_bind_passwd'] = 'mypassword'; $tlCfg->authentication['ldap_tls'] = false; $tlCfg->user_self_signup = true; I'm certain that OpenLDAP is 2.X. My TestLink version is 1.9.3 What could I be doing wrong?

    Read the article

  • Replicate between mysql 5.0.xx community and enterprise edition over ssh

    - by Arlukin
    I'm trying to setup a mysql replication over an SSH tunnel. The odd thing about this setup is that I have one master with mysql 5.0.60sp1-enterprise-gpl-log and one slave with mysql 5.0.67-community-log. Could it be so that it's not possible to replicate between community and enterprise edition? As you can see in my log below, it's possible to login on the remote server with the mysql client. But the replication get "Can't connect to MySQL server on '127.0.0.1' (13)" Is it any log file I have forgotten to look in, to get more info? [root@mysql1-av ~]# mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 73 Server version: 5.0.67-community-log MySQL Community Edition (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. The version of the slave mysql [root@mysql1-av ~]# autossh -f -M 20001 -L 3307:10.200.200.200:3306 [email protected] -N [root@mysql1-av ~]# mysql -h127.0.0.1 --port 3307 -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5189 Server version: 5.0.60sp1-enterprise-gpl-log MySQL Enterprise Server (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> Aborted Login to the master mysql with the mysql client over the ssh tunnel. [root@mysql1-av ~]# mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 75 Server version: 5.0.67-community-log MySQL Community Edition (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> change master to master_host='127.0.0.1', MASTER_PORT=3307, master_user='xxxx', master_password='xxxx', master_log_file='bin.000001'; Query OK, 0 rows affected (0.00 sec) mysql> start slave; Query OK, 0 rows affected (0.00 sec) mysql> show slave status \G *************************** 1. row *************************** Slave_IO_State: Connecting to master Master_Host: 127.0.0.1 Master_User: replNSG Master_Port: 3307 Connect_Retry: 60 Master_Log_File: bin.000001 Read_Master_Log_Pos: 4 Relay_Log_File: relay.000001 Relay_Log_Pos: 98 Relay_Master_Log_File: bin.000001 Slave_IO_Running: No Slave_SQL_Running: Yes Replicate_Do_DB: Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 0 Last_Error: Skip_Counter: 0 Exec_Master_Log_Pos: 4 Relay_Log_Space: 98 Until_Condition: None Until_Log_File: Until_Log_Pos: 0 Master_SSL_Allowed: No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: NULL 1 row in set (0.00 sec) Start the replication, but it breaks on IO. [root@mysql1-av ~]# tail /var/log/mysqld.log 120921 22:17:59 [Note] Slave I/O thread killed while connecting to master 120921 22:17:59 [Note] Slave I/O thread exiting, read up to log 'bin.000001', position 4 120921 22:17:59 [Note] Error reading relay log event: slave SQL thread was killed 120921 22:29:36 [Note] Slave SQL thread initialized, starting replication in log 'bin.000001' at position 4, relay log '/var/lib/mysql/relay.000001' position: 4 120921 22:29:36 [ERROR] Slave I/O thread: error connecting to master '[email protected]:3307': Error: 'Can't connect to MySQL server on '127.0.0.1' (13)' errno: 2003 retry-time: 60 retries: 86400 Because it can't connect to the master server.

    Read the article

  • OWA draft folder doesn't sync up wint Outlook 2007 (when using Citrix)

    - by George
    I have a user logging in to Citrix Server (on Windows 2003) to use Outlook 2007. In OWA, he sees all his drafts in Draft Folder and can easily access them, but when he is Citrix, he can see the folder, but not the messages. I had him check Normal and Favorite Folders under View - Navigation Pane as well as execute outlook /cleanviews to no help. I should also clarify, we host exchange locally and it syncs up with Outlook 2007 in Citrix. Remote users use either OWA for access or login to Citrix and use Outlook 2007. In his case ALL folders appear in Outlook 2007, but draft folder doesn't show any saved messages, even though in OWA messages are there and he can edit, delete and send them. Please, help! Thanks!!!

    Read the article

  • Our clients site is redirecting to a pill scammy site [closed]

    - by Alex Demchak
    Possible Duplicate: My server's been hacked EMERGENCY We've usually host our clients site, but we aren't hosting this one. The website itself (weddle-funeral.com) works just fine. if you load google and search for weddle funeral stayton oregon - and click that link, the site links to a scammy pill site. I went through the site and there were some php files in the wordpress plugins that got quarantined by my antivirus. I removed ALL non essential files, and uploaded fresh versions of all the plugins, but it's STILL redirecting from google. I tried logging in to the cpanel (on a virtual private server), and the cpanel flashed a red warning screen The site's security certificate is not trusted! You attempted to reach XXXXX.com, but the server presented a certificate issued by an entity that is not trusted by your computer's operating system. This may mean that the server has generated its own security credentials, which Google Chrome cannot rely on for identity information, or an attacker may be trying to intercept your communications. You should not proceed, especially if you have never seen this warning before for this site. (Keep in mind, that's for the HOSTING accounts CPanel) Is there something in the SERVER probably that's causing the redirect? EDIT: .htaccess file contents # 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

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19  | Next Page >