Search Results

Search found 7418 results on 297 pages for 'argument passing'.

Page 165/297 | < Previous Page | 161 162 163 164 165 166 167 168 169 170 171 172  | Next Page >

  • Function calls in virtual machine killing performance

    - by GenTiradentes
    I wrote a virtual machine in C, which has a call table populated by pointers to functions that provide the functionality of the VM's opcodes. When the virtual machine is run, it first interprets a program, creating an array of indexes corresponding to the appropriate function in the call table for the opcode provided. It then loops through the array, calling each function until it reaches the end. Each instruction is extremely small, typically one line. Perfect for inlining. The problem is that the compiler doesn't know when any of the virtual machine's instructions are going to be called, as it's decided at runtime, so it can't inline them. The overhead of function calls and argument passing is killing the performance of my VM. Any ideas on how to get around this?

    Read the article

  • Is it possible to Update Sharepoint List Without "ID" ?

    - by Pari
    I want to Upload File on Sharepoint and while apploading only i want to add all properties of Uploaded Document. We get ID field only when Document is uploaded on Sharepoint. Is there any other way to Update List without passing ID Field. Example: <Batch OnError="Continue" ListVersion="1" ViewName="270C0508-A54F-4387-8AD0-49686D685EB2"> <Method ID="1" Cmd="Update"> <Field Name="ID">4<Field> <Field Name="Field_Name">Value</Field> </Method> <Method ID="2" Cmd="Update"> <Field Name="ID" >6</Field> <Field Name="Field_Name">Value</Field> </Method> </Batch> Refering Link I am using Sharepoint Web Services.And Uploading Document in Chunks.**

    Read the article

  • How do I pass a struct (or class) message back and forth between a C# service and a separate VB 6 ap

    - by grantjumper
    I need to pass data between a c# service and a running vb 6 application, considering using Windows Messaging. How do I pass the data back and forth between a C# service and a running vb 6 application? Shortened sample of the data I am passing back and forth is below: namespace MainSection { public struct Info { private int _Id; private string _TypeCode; private float _Calc; private DateTime _ProcessDate; private bool _ProcessFlag; public int Id { get { return _Id; } set { _Id = value; } } public string TypeCode { get { return _TypeCode; } set { _TypeCode = value; } } public float Calc { get { return _Calc; } set { _Calc = value; } } public DateTime ProcessDate { get { return _ProcessDate} set { _ProcessDate = value; } } public bool ProcessFlag { get { return _ProcessFlag} set { _ProcessFlag = value; } } } }

    Read the article

  • Facebook, Flash and maintaining state

    - by Myk
    So here's the situation: I have a Flash application I'm deploying to facebook as a canvas app. There are various states within this app - different "pages", sort of. I want to be able to share this app with other users using Facebook's baked-in sharing mechanism. However, I want each state to have its own share button. That way when someone clicks Share on page 3 they are actually sharing page 3, not the root of the whole application. Does anyone know if Facebook exposes some mechanism by which this could be possible? It would be as simple as passing a string into the iFrame that holds the canvas app, so I could load it in as a FlashVar and work from there. I'm kind of beating my head against the wall - does this request make sense, and has anyone tackled anything like this before? Thanks!

    Read the article

  • jQuery: how to pick unique IDs ?

    - by Seerumi
    Hello. New to whole this jQuery (and javascript altogether, heh) and so far it's been excellent, but now I'm in a small pickle. Let's say I have list of forms generated from SQL database and every single one of them has to have unique id, so how I can select the specific item that is to be manipulated (changing values via php). the $("#submit").click(function()) will trigger every submit buttons on the page, so how I can the #submit to be some random id that I clicked. There might be a smarter way, but I'm new to this so try to bear with me. thought of passing the unique value with onClick="myfunction(unique_id)", but don't know how it goes with jQuery. hope this made any sense

    Read the article

  • Should I use "id" or "unique username"?

    - by roa3
    I am using PHP, AS3 and mysql. I have a website. A flash(as3) website. The flash website store the members' information in mysql database through php. In "members" table, i have "id" as the primary key and "username" as a unique field. Now my situation is: When flash want to display a member's profile. My questions: Should Flash pass the member "ID" or "username" to php to process the mysql query? Is there any different passing the "id" or "username"? Which one is more secure? Which one you recommend? I would like to optimize my website in terms of security and performance.

    Read the article

  • Can a rake task know about the other tasks in the invocation chain?

    - by andrewdotnich
    Rake (like make) is able to have many targets/tasks specified on invocation. Is it possible for a rake task to access the list of tasks the user invoked, in order to do its job? Scenario: Consider a Rake-based build tool. A help task would like to know what tasks were also specified in order to print their usage and halt the build process. The benefit of this as opposed to rake-style parameter passing are cleaner syntax (rake help build instead of rake help task=build) and chaining (rake help build run_tests would print usage for both).

    Read the article

  • jQuery - how to pass $(this) as an object?

    - by regan
    Hello! I'm trying to pass an object into a function but think there's a problem with $(this) not actually being valid at the point of passing it in. $('textarea#quote').live('bind',function(){ }).limit('10',$(this).parents('form').children().find('span#qc') ); The second parameter can be either a string or an object like $('span#qc'), but I also want to be able to pass in an object which references the current one. Why? Because I have several forms on same page, each containing textarea#quote, so depending on which form is selected I want to be able to reference a particular element within the same form. Anyone??

    Read the article

  • Maven easyb plugin java heap space settings?

    - by vinnu
    Hi, I attempted to change my heap size for maven easyb plugin http://www.easyb.org/maven-easyb-plugin/. In my easyb test I added standard code to print the heap size using the code Runtime.getFreeMemory() and Runtime.getTotalMemory(). I tried setting the MAVEN_OPTS=-Xmx1024m -Xms1024m and also set the maven opts in Maven surefire plugin. Now when I run the same class from the Junit I can see the getTotalMemory() displaying a number close 1Gig but the when the same classes are invoked from easyb plugin they do not reflect the memory size. Shouldn't there be a way of passing JVM opts to maven easyb plugin when it runs these easyb tests? At the very minimum it should atleast pick up the MAVEN_OPTS settings from the environment. Has someone bumped into problems like this? (A search on this group's archive does not reveal much)

    Read the article

  • how to pass session variable to model in RoR?

    - by siulamvictor
    I used a global variable in my app for passing information before. But I got a problem and thanks everyone here suggested me to store those data in session with database. I tried, but I found that I can't access the session variable in Model. I googled and knew this is the Model normal behavior, RoR won't pass the session variable to Model. So how to pass the value of the session variable into Models? or is there any other method for my use case? I need a variable storing a value, which is required in all MVCs, and should be independent between different concurrent users. Thanks everyone. :)

    Read the article

  • Cannot implicitly convert type 'char*' to 'bool'

    - by neeraj
    i was trying to passing pointer value in the function , i really got stuck here I am a beginner , not getting what value should be put this is programme from the reference of the book "Cracking the coding interview " By Gayle Laakmann McDowell, class Program { unsafe void reverse(char *str) { char* end = str; char tmp; if (str) //Cannot implicitly convert type 'char*' to 'bool' { while(*end) //Cannot implicitly convert type 'char*' to 'bool' { ++end; } --end; while(str<end) { tmp = *str; *str+= *end; *end-= tmp; } } } public static void Main(string[] args) { } }

    Read the article

  • Get an Entity in Save Method, What is correct form ?

    - by Felipe
    Hi everybody I'm begginer in asp.net mvc and i have some doubts. P.S: I'm using DDD to learn I have an ACtion in a Controller and it'll save an entity (from my model) by a repository (for a database). My doubts is, How can I get the informations from the View and save it by a repository in my Controller ? Is it correct to get an entity of my Model in Save method of controller, like this: public ActionResult Save(Product product) { // validate object // save data in repository return View("Success"); } Or Need I get an DTO (with a structure similar to my entity) and create an object passing property by property to an entity ? I didnt' like of FormCollection and I'd like to know, What is recommended architecturally ? Thanks a lot guys Cheers

    Read the article

  • Problem with number/type of arguments passed to an overloaded c++ constructor wrapped with swig.

    - by MiKo
    I am trying to wrap a c++ class (let's call it "Spam") written by someone else with swig to expose it to Python. After solving several problems, I am able to import the module in python, but when I try to create an object of such class I obtain the following error: foo = Spam.Spam('abc',3) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "Spam.py", line 96, in __init__ this = _Spam.new_Spam(*args) NotImplementedError: Wrong number of arguments for overloaded function 'new_Spam'. Possible C/C++ prototypes are: Spam(unsigned char *,unsigned long,bool,unsigned int,SSTree::io_action,char const *) Spam(unsigned char *,unsigned long,bool,unsigned int,SSTree::io_action) Spam(unsigned char *,unsigned long,bool,unsigned int) Spam(unsigned char *,unsigned long,bool) Spam(unsigned char *,unsigned long) Googling around, I realized that the error is probably caused by the type of the arguments and not by the number (which is quite confusing), but I still cannot identify. I suspect the problem lies in passing a string as the first argument, but have no idea on how to fix it (keep in mind that I know almost no c/c++).

    Read the article

  • Mounting Solaris UFS partition on Debian(with FreeBSD kernel)

    - by hayalci
    I have some disks that were being used on a Solaris system. The disks are formatted as UFS. I attached them to a Debian system (with FreeBSD kernel. Debian/kFreeBSD), but I cannot mount them. $ mount -t ufs /dev/da2s1 /mnt/diska mount: /dev/da2s1 : Invalid argument Also the tunefs.ufs does not work; $ tunefs.ufs -p /dev/da2s1 tunefs.ufs: /dev/da2s1: could not read superblock to fill out disk Is there an incompatibility between FreeBSD UFS and Solaris UFS? Is it possible to mount one, under the other OS ? Note: tunefs.ufs works on the root partition $ tunefs.ufs -p /dev/da7s2 tunefs.ufs: ACLs: (-a) disabled tunefs.ufs: MAC multilabel: (-l) disabled tunefs.ufs: soft updates: (-n) disabled tunefs.ufs: gjournal: (-J) disabled tunefs.ufs: maximum blocks per file in a cylinder group: (-e) 2048 tunefs.ufs: average file size: (-f) 16384 tunefs.ufs: average number of files in a directory: (-s) 64 tunefs.ufs: minimum percentage of free space: (-m) 8% tunefs.ufs: optimization preference: (-o) time tunefs.ufs: volume label: (-L)

    Read the article

  • XAMPP won't start Apache on Mac OS

    - by Paul Masri
    When I try starting Apache from the XAMPP control panel (Mac OSX Snow Leopard), I get the following error popup and Apache won't start: /Applications/XAMPP/xamppfiles/bin/apachectl: line 70: ulimit: open files: cannot modify limit: Invalid argument (48)Address already in use: make_sock: could not bind to address [::]:80 XAMPP was running perfectly 10 minutes earlier. I stopped Apache to add some .conf files and it failed on restart. I removed all the new .conf files (i.e. reverted it to how it was before) but now I get the above message. EDIT: I've checked AppMonitor and I see the "httpd" processes (one by _www nested within root). Just tried quitting these but they're auto-restarted on new process IDs and it didn't solve the problem.

    Read the article

  • How to scrub a document of all text between brackets with find and replace

    - by sam
    I have a log file and I need to find all instances of <password> hash here </password> and remove the hash and replace it with some dummy text like aaa-aaa-aaa-aaaa. The recurring search argument is anything that matches a bracket that starts with <password> and ends with </password>. All the hashes being replaced will be different. What's the easiest way to go a bout this? The log is on a windows machine. Probably easiest would be to use MS word for me, unless it's achievable with wordpad, notepad, or some other light weight editor like textpad. thanks

    Read the article

  • Converting BindingList(Of T) to Array

    - by George
    Public Class Orders Inherits System.ComponentModel.BindingList(Of Order) End Class Public Sub DataBind(ByVal Orders() As Orders) End Sub Dim MyOrders() As Order = Orders.ToArray SuperListBinder.DataBind(MyOrders) '<<Error occurs on this line I don't understand this error. I think that I am passing the appropriate data type to a sub. I don't understand the meaning of "Cannot convert object of type x to an object of type x! Note that, if relevant, my Solution File contains ,multiple projects and that they are all project references. Error: Error 1 Value of type '1-dimensional array of BESI.BusinessObjects.Order' cannot be converted to '1-dimensional array of BESI.BusinessObjects.Orders' because 'BESI.BusinessObjects.Order' is not derived from 'BESI.BusinessObjects.Orders'. C:\My\Code\BESI\BesiAdmin\Forms\Activity.vb 17 34 BesiAdmin

    Read the article

  • Set the path for the location of media files in program

    - by Zaheer Boovaji
    I have made a Java Swing Desktop application in Netbeans which can play media files I have put the videos in my workspace resources location and in my java program I am calling those media files using an URL which is something like this: C:/users/Dell/My Documents /NetBeansProjects/Media/src/resources/ MediaFiles/ddd.mpg This works well when I run in my IDE and also i have made Jar for this it works well on my computer but the problem is when i copy this jar file on my friends system the interface is coming but when I click a button to play a media file it says: C:/users/Dell/MyDocuments/NetBeansProjects/Media/src/resources/ MediaFiles/ddd.mpg does not exist So, please provide me a solution of how to set the default path so that when I run a jar file on other systems it should play the media file location I am passing as in my program. How to set the path for the location of media files in program? Update The videos are in the jar file.

    Read the article

  • Handling Messages in Console Apps/DLLs in C++ Win32

    - by vsimon
    I would like to have the ability to process Win32 messages in a console app and/or inside a standalone DLL. I have been able to do it in .NET with the following article and it works great in C# inside a console app and standalone DLL http://msdn.microsoft.com/en-us/magazine/cc163417.aspx Is there a way to do the equivalent with C/C++ Win32 APIs? I have tried doing RegisterClassEx(...) and CreateWindow(...) even passing in HWND_MESSAGE to hWndParent but the trouble is that after the "invisible" window is created messages are not being processed probably due to the lack of a message pump. Where would the message pump go if you had a DLL entry point? I have tried creating another thread in a DLL and put while(GetMesage(..)) there but that did not work either. Any ideas?

    Read the article

  • Why do debug symbols so adversely affect the performance of threaded applications on Linux?

    - by fluffels
    Hi. I'm writing a ray tracer. Recently, I added threading to the program to exploit the additional cores on my i5 Quad Core. In a weird turn of events the debug version of the application is now running slower, but the optimized build is running faster than before I added threading. I'm passing the "-g -pg" flags to gcc for the debug build and the "-O3" flag for the optimized build. Host system: Ubuntu Linux 10.4 AMD64. I know that debug symbols add significant overhead to the program, but the relative performance has always been maintained. I.e. a faster algorithm will always run faster in both debug and optimization builds. Any idea why I'm seeing this behavior?

    Read the article

  • Update music file details - Java.

    - by Desorder
    Hi all, Well, I'm a music fan guy, and now with my 18000 music collection, it's getting very hard to maintain. So, I would like to ask I could of question to help to write an app to maintain it for me. 1- How can I access a music file and read details of it? I mean, I would like to write some code and passing the directory, my app would read all the music files (understand mp3 files) and with that I would like to access details like title, artist, length and so on... 2- Is there a public source that I could access and update my file? A webservice somewhere that I could connect, query some information based on song name, or artist or whatever. I would like to achieve a final result of given a directory, my app would read the file, collect some information and query the source for a complete list of detail and update my file. Thank you guys for any help...

    Read the article

  • Using xsl param (if exists) to replcae attribute value

    - by Assaf
    I would like an xsl that replaces the value attribute of the data elements only if the relevant param names are passed. Input <applicationVariables applicationServer="tomcat"> <data name="HOST" value="localhost"/> <data name="PORT" value="8080"/> <data name="SIZE" value="1000"/> </applicationVariables> So for example if passing in a param HOST1=myHost and PORT=9080 the output should be: <applicationVariables applicationServer="tomcat"> <data name="HOST" value="myHost"/> <data name="PORT" value="9080"/> <data name="SIZE" value="1000"/> </applicationVariables> Note that HOST and PORT where replaced but SIZE was not replaced because there was no parameter with name SIZE Since the list of data elements is long (and may change), i would like a generic way of doing this with xsl

    Read the article

  • sql query with alias name

    - by Ranjana
    i have a table with this columns--- Or orgid ispaid validity noofthingstoTake 1 yes 2010-06-05 20 2 yes 2010-06-09 7 i have used this query(to join two more tableS): select distinct B.RequirementID,A.OrganizationID from Organization A,RequirementsDetailsforOrganization B,validityorgdet F where A.OrganizationID=B.OrganizationID and F.orgid=A.OrganizationID and F.ispaid=1 and F.validity>=GETDATE() and F.noofthingstoTake> ?? but i dont know how to check the (noofthingstaken) over here. it should not exceed 20. im passing this query from my code behind page to the Sql. how to get the query excute to check it should not exceed the noofthingstaken pls help me out....????

    Read the article

  • Why input elements don't render the value passed in ASP.Net MVC?

    - by MediaSlayer
    This post asks this question but doesn't really give an answer, so I thought I would ask the question differently. I have a page that renders a hidden value from the model: <%=Html.Hidden("myName", model.myValue) %> Since I am passing a value in the value parameter, you would think it would output that value, but it doesn't. The code for rendering input fields has the following: string attemptedValue = (string)htmlHelper.GetModelStateValue(name, typeof(string)); tagBuilder.MergeAttribute("value", attemptedValue ?? ((useViewData) ? htmlHelper.EvalString(name) : valueParameter), isExplicitValue); Basically, if the ModelState (which contains posted values) contains a value for the "name" passed, it will use that value instead of your passed value to the helper method. In my case, I updated the model and my updated value wasn't outputted. If I pass a value to a method, I expect that value to be rendered. Am I missing something in this design or is it just wrong?

    Read the article

  • Multivalue parametres in SSRS- display in the report

    - by pfeffer
    I just started working with SSRS, so this question might seem silly. Anyway, for now I'm trying to avoid multi-valued parameters, because I want my parameters to be able to be NULL. So I'm just passing a comma-separated string of ID values to my stored procedure, and everything works. The problem I encountered is that I want to display the actual values, not IDs, in the report, so that users can see, what filter was used. If that were a multi-valued parameter, I would simply use JOIN function, but now I am out of ideas and would really appreciate some help. Thanks!

    Read the article

< Previous Page | 161 162 163 164 165 166 167 168 169 170 171 172  | Next Page >