Search Results

Search found 8286 results on 332 pages for 'defined'.

Page 177/332 | < Previous Page | 173 174 175 176 177 178 179 180 181 182 183 184  | Next Page >

  • jQuery Upload Progress Plugin Not working in Chrome and Safari

    - by Conceited Code
    I am using the jquery.uploadprogress plugin to get the upload progress of a file from the NginxHttpUploadProgressModule. This is inside an iframe for a facebook application. It works in firefox, but it fails in chrome/safari. When I open the console I get this. Uncaught ReferenceError: progressFrame is not defined jquery.uploadprogress.js:80 Any idea how I would fix that? I would like to also send the file using AJAX when it is completed. How would I implement that? EDIT: I need this soon and it is important so I am going to put a 100 point bounty on this question. The first person to answer it will receive the 100 points. EDIT 2: Jake33 helped me solve the first problem. First person to leave a response with how to send the file with ajax too will receive the 100 points.

    Read the article

  • Optimal sorting algorithm with modified cost... [closed]

    - by David
    The numbers are in a list that is not sorted and supports only one type of operation. The operation is defined as follows: Given a position i and a position j the operation moves the number at position i to position j without altering the relative order of the other numbers. If i j, the positions of the numbers between positions j and i - 1 increment by 1, otherwise if i < j the positions of the numbers between positions i+1 and j decreases by 1. This operation requires i steps to find a number to move and j steps to locate the position to which you want to move it. Then the number of steps required to move a number of position i to position j is i+j. Design an algorithm that given a list of numbers, determine the optimal(in terms of cost) sequence of moves to rearrange the sequence.

    Read the article

  • Why does MySQL autoincrement increase on failed inserts?

    - by Sorcy
    A co-worker just made me aware of a very strange MySQL behavior. Assuming you have a table with an auto_increment field and another field that is set to unique (e.g. a username-field). When trying to insert a row with a username thats already in the table the insert fails, as expected. Yet the auto_increment value is increased as can be seen when you insert a valid new entry after several failed attempts. For example, when our last entry looks like this... ID: 10 Username: myname ...and we try five new entries with the same username value on our next insert we will have created a new row like so: ID: 16 Username: mynewname While this is not a big problem in itself it seems like a very silly attack vector to kill a table by flooding it with failed insert requests, as the MySQL Reference Manual states: "The behavior of the auto-increment mechanism is not defined if [...] the value becomes bigger than the maximum integer that can be stored in the specified integer type." Is this expected behavior?

    Read the article

  • perl ENV value avoid escape

    - by Michael
    In my makefile I have command in variable like this substitute := perl -p -e 's/@([^@]+)@/"$(update_url)"/ge' > output.txt update_url := em:updateURL=\"http:\/\/bla\/update.rdf\"\n this works fine when I run command in target and I have newline, quotes however I need to replace $(update_url)" with environment variable, using expression like this #substitute := perl -p -e 's/@([^@]+)@/defined $$ENV{$$1} ? $$ENV{$$1} : $$1/ge' I am exporting those variables from makefile. This gives me literally em:updateURL=\"http:\/\/bla\/update.rdf\"\n on output file... so how to make the second version to give output like first version?

    Read the article

  • changing command line arguments

    - by Shadi
    Hi, I am writing a C program. It takes its arguments from commandLine. I want to change the commandLine arguments in the code. As they are defined as "const char *", I can not change them using "strcpy", "memcpy", ... Also, you know, I can not just change their type from "const char *" to "char *". Is there any way to change them? Thank you so much in advance. Best regards, Shadi.

    Read the article

  • change `dest` option on the fly

    - by Rikard
    I have some grunt tasks to compile files and would like to "recicle" them inside different tasks. I am trying to modify the destination directory without success... My idea is something like: grunt.registerTask('bower', ['compile:index', 'compile:core'], function(){ this.options({dest: 'dist/*.js'}); }); The compile:index task runs good by itself (i.e. when called alone) and has dest: 'index.js, other tasks have other filenames. I would like to change these inside the bowertask, adding a new directory but keeping the filename defined in the original task. Is this possible?

    Read the article

  • Determine when using the VC90 compiler in VS2010 instead of VS2008?

    - by Dan
    Is there a (Microsoft-specific) CPP macro to determine when I'm using the VC9 compiler in Visual Studio 2010 as opposed to Visual Studio 2008? _MSC_VER returns the compiler version, so with VS2010 multi-targeting feature, I'll get the same result as with VS2008. The reason for wanting to know the difference is that I created a new VS2010 project which contains code removed from a larger project. I just left the VS2008 stuff "as is" since we're moving away from VS2008 "soon" anyway and I didn't want to go through the hassle of creating a vcproj file along with the new vcxproj. For now, I've just defined my own macro to indicate whether the code is compiled into its own DLL or not; it works just fine, but it would be nice if there were something slightly more elegant.

    Read the article

  • Boost::Archive causing weird linker error.

    - by Dallin Wellington
    Does anyone have a clue why those two lines would cause that linker error? std::ifstream ifs("filename.file"); boost::archive::binary_iarchive iarchv( ifs ); Error 8 fatal error LNK1104: cannot open file 'F:\dev\project\build\win32-unit\tests\Debug\framework_core_tests.lib' ramework_core_tests framework_core_tests The same happens with any Boost::Archive type. Its trying to link against a library of the same name as my executable for some reason when that project doesn't nor never existed and is not defined as a library to link against in my project files.

    Read the article

  • Calling unmanaged c++ code in C# Mixed with STL

    - by Turtle
    Hey, I want to call unmanaged c++ code in C# The function interface is like following(I simplified it to make it easy to understand) Face genMesh(int param1, int param2); Face is a struct defined as: struct Face{ vector<float> nodes; vector<int> indexs; } I googled and read the MSDN docs found ways to call simple c/c++ unmanged code in C#, also know how to hand the struct as return value. And My question is how to handle "vector". I did not find rules about mapping between vector and some types in C# Thanks!

    Read the article

  • The reason for MonadState get and put?

    - by CiscoIPPhone
    I'm reading the Monads chapter in Real World Haskell (chapter 14). A function is defined as follows: type RandomState a = State StdGen a getRandom :: Random a => RandomState a getRandom = get >>= \gen -> let (val, gen')= random gen in put gen' >> return val I don't really understand the purpose of the get and put functions here. I rewrote the function as following which seems to do the same thing and is more concise: getRandom2 :: Random a => RandomState a getRandom2= State $ \ s -> random s So my question is: What is the purpose of get and put?

    Read the article

  • First try StructureMap and MVC3 via NuGet

    - by Angel Escobedo
    Hello Guys, I'm trying to figure how to config StructureMap for ASP.NET MVC3 I've already using NuGet and I notice that it creates App_Start Folder with a cs file named as StructuremapMVC, so I check it and notice that is the same code but simplified that will be written manually on App_Start section placed on Global.asax... My Question is when I inject some IoC on my Controllers as the follow (I use this pattern : Entity Framework 4 CTP 4 / CTP 5 Generic Repository Pattern and Unit Testable) : private readonly IAsambleaRepository _aRep; private readonly IUnitOfWork _uOw; public AsambleaController(IAsambleaRepository aRep, IUnitOfWork uOw) { _aRep = aRep; this._uOw = uOw; } public ActionResult List(string period) { var rs = _aRep.ByPeriodo(period).ToList<Asamblea>(); return View(); } I got an Exception Exception Details: System.MissingMethodException: No parameterless constructor defined for this object.

    Read the article

  • pinvoke to clutter function

    - by trampster
    I'm trying to pinvoke to a clutter function. The function is defined in the docs as ClutterActor * clutter_texture_new_from_actor (ClutterActor *actor); The code I have is as follows: [DllImport ("libclutter-glx-1.0.so.0")] private static extern IntPtr clutter_texture_new_from_file (string filename, IntPtr errorData); And I call it like this: IntPtr texture = clutter_texture_new_from_file("myImage.jpeg",IntPtr.Zero); however when called like this in monodevelop on ubuntu I get the following error. Unix Transport Error Eventally I would like to get the error reporting working so I can get the gerror result however firstly I need to get past the Unix Transport Error.

    Read the article

  • Microsoft SQL Server 2008 - 99% fragmentation on non-clustered, non-unique index

    - by user550441
    I have a table with several indexes (defined below). One of the indexes (IX_external_guid_3) has 99% fragmentation regardless of rebuilding/reorganizing the index. Anyone have any idea as to what might cause this, or the best way to fix it? We are using Entity Framework 4.0 to query this, the EF queries on the other indexed fields about 10x faster on average then the external_guid_3 field, however an ADO.Net query is roughly the same speed on both (though 2x slower than the EF Query to indexed fields). Table id(PK, int, not null) guid(uniqueidentifier, null, rowguid) external_guid_1(uniqueidentifier, not null) external_guid_2(uniqueidentifier, null) state(varchar(32), null) value(varchar(max), null) infoset(XML(.), null) -- usually 2-4K created_time(datetime, null) updated_time(datetime, null) external_guid_3(uniqueidentifier, not null) FK_id(FK, int, null) locking_guid(uniqueidentifer, null) locked_time(datetime, null) external_guid_4(uniqueidentifier, null) corrected_time(datetime, null) is_add(bit, not null) score(int, null) row_version(timestamp, null) Indexes PK_table(Clustered) IX_created_time(Non-Unique, Non-Clustered) IX_external_guid_1(Non-Unique, Non-Clustered) IX_guid(Non-Unique, Non-Clustered) IX_external_guid_3(Non-Unique, Non-Clustered) IX_state(Non-Unique, Non-Clustered)

    Read the article

  • Stopping httpd causes a process started from perl CGI script to receive SIGTERM

    - by Pranav Pal
    I am running a shell script from a perl CGI script: #!/usr/bin/perl my $command = "./script.sh &"; my $pid = fork(); if (defined($pid) && $pid==0) { # background process system( $command ); } The shell script looks like this: #!/bin/sh trap 'echo trapped' 15 tail -f test.log When I run the CGI script from browser, and then stop httpd using /etc/init.d/httpd stop, the script receives a SIGTERM signal. I was expecting the script to run as a separate process and not be tied in anyway to httpd. Though I can trap the SIGTERM, I would like to understand why the script is receiving SIGTERM at all. What wrong am I doing here? I am running RHEL 5.8 and Apache HTTP server 2.4. Thanks, Pranav

    Read the article

  • JXTreeTable and BorderHighlighter Drawing Border on All Rows

    - by Kevin Rubin
    I'm using a BorderHighlighter on my JXTreeTable to put a border above each of the table cells on non-leaf rows to give a more clear visual separator for users. The problem is that when I expand the hierarchical column, all cells in the hierarchical column, for all rows, include the Border from the Highlighter. The other columns are displaying just fine. My BorderHighlighter is defined like this: Highlighter topHighlighter = new BorderHighlighter(new HighlightPredicate() { @Override public boolean isHighlighted(Component component, ComponentAdapter adapter) { TreePath path = treeTable.getPathForRow(adapter.row); TreeTableModel model = treeTable.getTreeTableModel(); Boolean isParent = !model.isLeaf(path.getLastPathComponent()); return isParent; } }, BorderFactory.createMatteBorder(2, 0, 0, 0, Color.RED)); I'm using SwingX 1.6.5.

    Read the article

  • Turning a refresh ImageView into a ProgressBar

    - by Macarse
    I am doing a custom title for my android app and I want to have a refresh button like the Twitter app. I am using a RelativeLayout an my ImageView is defined by: <ImageView android:id="@+id/title_refresh" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_menu_refresh" android:layout_alignParentRight="true"> </ImageView> In my Activity I have something like this: refreshView = (ImageView) findViewById(R.id.title_refresh); refreshView.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { /* Make the refreshView turn into a progress bar. */ startService(new Intent(MyActivity.this, MyService.class)); } } I would like the ImageView to turn into a ProgressBar while I wait for my service to finish processing. How is the correct way to do this?

    Read the article

  • [ANT] Not able to invoke remote script in windows from linux using SSHEXEC

    - by jpegu
    Hi, I have set up OpenSSH in my windows environment and wants to invoke a ANT script from a Linux environment. But i'm getting the following error: $ ant -f invoke.xml Buildfile: /home/inysi/jpegu/cdt/tmp/invoke.xml run: [sshexec] Connecting to ****** [sshexec] cmd : ant -f build.xml [sshexec] uname: not found [sshexec] basename: not found [sshexec] dirname: not found [sshexec] Error: JAVA_HOME is not defined correctly. [sshexec] We cannot execute java [sshexec] which: not found BUILD SUCCESSFUL Total time: 2 seconds But, i can invoke the remote ANT script in Linux environment using SSHEXEC from windows. Can you please let me know, what could be the issue. JAVA_HOME is set in the windows environment variables. Where to set JAVA_HOME in the windows environment. Is there something similar to .bash_profile in windows. So that ANT process can pick it up.

    Read the article

  • How to make tag group with including predefined attributes, to wrap other things quickly?

    - by jitendra
    for example. if i want to quickly wrap anything by this in once. in dreamweaver or in any other free software where i can do this. I want to select this <p>anything can be here - content, other html tag etc.</p> and in one shot want to wrap inside 2 divs with predefined classes <div class="one"> <div class="two"> <p>anything can be here - content, other html tag etc.</p> </div> </div> I have work with large amount of code and need to wrap random things in Divs with defined attributes.

    Read the article

  • Why does C's "fopen" take a "const char *" as its second argument?

    - by Chris Cooper
    It has always struck me as strange that the C function "fopen" takes a "const char *" as the second argument. I would think it would be easier to both read your code and implement the library's code if there were bit masks defined in stdio.h, like "IO_READ" and such, so you could do things like: FILE* myFile = fopen("file.txt", IO_READ & IO_WRITE); Is there a programmatic reason for the way it actually is, or is it just historic? (i.e. "That's just the way it is.")

    Read the article

  • Is Webhooks a style/pattern or a specification?

    - by Emilio
    I've been reading about Webhooks and I'm trying to determine if it's a specification vs a style/pattern. By "specification" I mean that the implementation details, e.g. headers, payload and so on are well defined. By "style" or "pattern" I mean in the sense that REST is a style (as opposed to a spec) or a pattern which describes usage but doesn't define implementation details. From what I see, Webhooks is a style/pattern. That the event(s) which triggers the http callbacks are generated however the developer wants, and that the http callbacks have no specific implementation requirements except to be an http post. Is this correct?

    Read the article

  • Target not being executed when imported to the main *.proj file

    - by Zbigniew Kawalec
    I use the TFS 2008 build facilities. I have a large MSBuild project (TFSBuild.proj) and I wanted to split it into a few files because it is becoming hard to maintain. I found a strange behavior; when I extracted one of the targets (BeforeInitializeWorkspace) to a separate file and then imported it into the main *.proj file, it was not executed. Although, in my MSBuild log, there was information that the target has been imported and overridden, but hasn't been executed. If I have the same target defined in my main *.proj file, it is executed. Can someone explain why the target isn't executed when imported from a file? Thanks,

    Read the article

  • Looking for a good explanation of the table generation macro idiom

    - by detly
    I want to make this clear up front : I know how this trick works, what I want is a link to a clear explanation to share with others. One of the answers to a C macro question talks about the "X macro" or "not yet defined macro" idiom. This involves defining something like: #define MAGIC_LIST \ X(name_1, default_1) \ X(name_2, default_2) \ ... Then to create, say, an array of values with named indices you do: typedef enum { #define X(name, val) name, MAGIC_LIST #undef X } NamedDefaults; You can repeat the procedure with a different #define for X() to create an array of values, and maybe debugging strings, etc. I'd like a link to a clear explanation of how this works, pitched at someone who is passably familiar with C. I have no idea what everyone usually calls this pattern, though, so my attempts to search the web for it have failed thus far. (If there is such an explanation on SO, that'd be fine...)

    Read the article

  • Cannot create instance of 'Ribbon'

    - by user354433
    I'm having trouble using the Ribbon control from the Office 2007 RibbonControlsLibrary.dll. It works for most people but not for me. The fault I get is: Cannot create instance of 'Ribbon' defined in assembly 'RibbonControlsLibrary, Version=3.5.31016.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Exception has been thrown by the target of an invocation The problem is probably not with the code since it works for other people. Its the Ribbon class thats causing the problem. If I remove any references to the Ribbon class but keep the references to RibbonWindow I don't get any exceptions. Any help appreciated

    Read the article

  • Error Downloading Metadata from ASMX Service

    - by michael.lukatchik
    It should be possible (and it looks like it is), but assume I have the following functions in my ASMX web service: [WebMethod(MessageName = "CreateExternalRpt1")] public bool CreateExternalRpt(int iProductId, int iOrderProductId, DateTime dtReportTime, string strReportTitle, string strReportCategory, string strReportPrintType, out string strSnapshot, string strApplicantFirst, string strApplicantLast, string strApplicantMiddle, string strOwnerLast, string strOwnerMiddle, string strOwnerFirst, bool blnCurrentReport, int iOrderId, bool blnFlag, string strCustomerId, string strUserId) { … } [WebMethod(MessageName = "CreateExternalRpt2")] public bool CreateExternalRpt(int iProductId, int iOrderProductId, DateTime dtReportTime, string strReportTitle, string strReportCategory, string strReportPrintType, string strReportSnapshot, string strApplicantFirst, string strApplicantLast, string strApplicantMiddle, string strOwnerLast, string strOwnerMiddle, string strOwnerFirst, bool blnCurrentReport, int iOrderId, bool blnFlag) { … } With both of these functions defined in my web service, my .NET client app can’t download the metadata and instead throws a generic error message “There was an error downloading…”. With one of the above methods removed, the .NET client app can successfully download the metadata. I’ve read that by decorating the WebMethod with a unique name, both functions should be exposed in the service metadata. This isn’t working. What am I missing?

    Read the article

  • custom DB logging using enterprise library 4.1

    - by Rohit
    We have to create a historical log of all the changed entities. we have defined our custom tables for this purpose. I have to incorporate this tables in Enterprise library logging block and do logging in these tables. I need to write a SP to insert values to these tables. Till now,what i have got from google is that i have to create a listener inheriting from CustomTraceListener and give my implementation of WriteMessage. What i need to know is,how will i plug my tables and SP in Enterprise library logging block.

    Read the article

< Previous Page | 173 174 175 176 177 178 179 180 181 182 183 184  | Next Page >