Search Results

Search found 46079 results on 1844 pages for 'virus name'.

Page 72/1844 | < Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >

  • Activator.CreateInstance with type name as string and including parameters

    - by Kelly
    I am working in .Net 3.5, looking at all the various constructors for Activator.CreateInstance. I want to create an instance of a class, calling a particular constructor. I do not have the class type, only its name. I have the following, which works, but actually winds up calling the parameterless constructor first, then the one I want. This is not a terribly big deal, but the parameterless constructor calls a rather busy base constructor, and the constructor I want to call does, too. In other words, given a type, calling CreateInstance with parameters is easy (only the last two lines below), but given only a type name, is there a better way than this? ObjectHandle oh = Activator.CreateInstance( "MyDllName", "MyNS." + "MyClassName" ); object o = oh.Unwrap( ); object newObj = Activator.CreateInstance( o.GetType( ), new object[] { param1 } ); return ( IMyDesiredObject )newObject; Thanks!

    Read the article

  • dose not name a type error in c++

    - by user985316
    #include <math.h> #include <stdlib.h> #include <stdio.h> #include <vector> #define IE 40 #define JE 40 #define KE 40 #define ia 7 #define ja 7 #define ka 7 #define NFREQS 3 using namespace std; main() float l,m,n,i,j,k,ic,jc,kc,nsteps,n_pml; float ddx,dt,T,epsz,muz,pi,eaf,npml; int ib,jb,kb; . . . . ic=IE*0.5 ; jc=JE*0.5 ; ....'ic'dose not name a type. ....'jc'dose not name a type.

    Read the article

  • Grouping by Name but disregarding capitalization...

    - by bgadoci
    I have built a Ruby on Rails app that allows users to track workouts. I also allow them to add groups (like blog tags) to workouts to help keep organized. In most places where I display the tags I do so by grouping by name. @group_counts = current_user.groups.count(:group => :name, :order => 'count_all DESC') Is there a way to disregard capitalization. For instance I have two different records returned for Push press and Push Press.

    Read the article

  • Find the "name" of a library (-L -l switches)

    - by sebastiangeiger
    Being fairly new to C++ I have a question bascially concerning the g++ compiler and especially the inclusion of libraries. Consider the following makefile: CPPFLAGS= -I libraries/boost_1_43_0-bin/include/ -I libraries/jpeg-8b-bin/include/ LDLIBS= libraries/jpeg-8b-bin/lib/libjpeg.a # LDLIBS= -L libraries/jpeg-8b-bin/lib -llibjpeg all: main main: main.o c++ -o main main.o $(LDLIBS) main.o: main.cpp c++ $(CPPFLAGS) -c main.cpp clean: rm -rf *.o main As you can see I declared the LDLIBS variable twice. My code is compiling and working if I use the makefile above. But if I deactivate the first LDLIBS entry and active the second one I get ld: library not found for -llibjpeg. I assume my libjpeg.a is just not called libjpeg but bears some different name. Is there a way to find out the name of a given "libraryfile" libsomething.a or libsomething.dyn?

    Read the article

  • Get current updated column name to use in a trigger

    - by Serge
    Is there a way to actually get the column name that was updated in order to use it in a trigger? Basically I'm trying to have an audit trail whenever a user inserts or updates a table (in this case it has to do with a Contact table) CREATE TRIGGER `after_update_contact` AFTER UPDATE ON `contact` FOR EACH ROW BEGIN INSERT INTO user_audit (id_user, even_date, table_name, record_id, field_name, old_value, new_value) VALUES (NEW.updatedby, NEW.lastUpdate, 'contact', NEW.id_contact, [...]) END How can I get the name of the column that's been updated and from that get the OLD and NEW values of that column. If multiple columns have been updated in a row or even multiple rows would it be possible to have an audit for each update?

    Read the article

  • Using windows CopyFile function to copy all files with certain name format

    - by Ben313
    Hello! I am updating some C code that copys files with a certain name. basically, I have a directory with a bunch of files named like so: AAAAA.1.XYZ AAAAA.2.ZYX AAAAA.3.YZX BBBBB.1.XYZ BBBBB.2.ZYX Now, In the old code, they just used a call to ShellExecute and used xcopy.exe. to get all the files starting with AAAAA, they just gave xcopy the name of the file as AAAAA.* and it knew to copy all of the files starting with AAAAA. now, im trying to get it to copy with out having to use the command line, and I am running into trouble. I was hoping CopyFile would be smart enough to handle AAAAA.* as the file to be copied, but it doesnt at all do what xcopy did. So, any Ideas on how to do this without the external call to xcopy.exe?

    Read the article

  • Controller with same name as an area - Asp.Net MVC4

    - by Trober
    I have a Contacts controller in the main/top area, and I have an area named "Contacts". I get POST 404s to the Contacts controller if I register my areas before I register my top-level routes: protected void Application_Start() { AreaRegistration.RegisterAllAreas(); ModelBinders.Binders.DefaultBinder = new NullStringBinder(); RouteConfig.RegisterRoutes(RouteTable.Routes); } And, if I register my areas after my routes, my 404s to the Contacts controller goes away, but my routes to the Contacts area are now 404s. ...lots of duplicate controller name questions logged, but I haven't found a specific scenario where the area is the same name as the controller. ...probably an easy fix. Would appreciate help. :-D

    Read the article

  • Passing domain name to PayPal

    - by ilhan
    I'm trying to sell something to domain owners. I need to know their domain names. Before the payment procedure I'll ask their domain names in my web site, I'll store the data in the cookies or the url, then I want to pass the data (domain name) to the PayPal so that I'll know who paid for what domain name. I know PHP and HTML in advanced level but I don't know how to pass the data to PayPal. How I'll do that? Thanks in advance!

    Read the article

  • Digester: Extracting node name for a map<tagname, value>

    - by enguerran
    My question is close to this one: Digester: Extracting node name Even with the answer, I can't find out. Here is my xml file (from smartgwt RestDataSource POST): <data> <isc_OID_14> <attribute1>value1</attribute1> <attribute2>value2</attribute2> </isc_OID_14> </data> I would like to create, with Commons Digester, the following map : {attribute1=value1, attribute2=value2} I already have those lines: digester = new Digester(); digester.addObjectCreate("data", HashMap.class); // some "put" rules matching something like data/* return digester.parse(myFile); I do not know the list nor the name of tags in the <data><sourceId /></data>. isc_OID_14 or attribute1 can be named foobar or id or attribute335...

    Read the article

  • Getting the class of an n dimensional array of an runtime supplied class name

    - by MeBigFatGuy
    Given a fully qualified class name, and a number of dimensions, i would like to get the Class name for this class. I believe i can do this like such public Class<?> getArrayClass(String className, int dimensions) throws ClassNotFoundException { Class<?> elementType = Class.forName(className); return Array.newInstance(elementType, new int[dimensions]).getClass(); } However this requires me to create an unneeded instance of the class. Is there a way to do this without creating the instance? It does not appear that Class.forName("[[[[Ljava/lang/String;") (or a algorithmically generated version) works correctly in all instances from various blog posts i've seen.

    Read the article

  • Comparing Page.User.Identity.Name to value in sql Table

    - by Peggy Fusselman
    First, I am SO sorry if the answer is out there. I've looked and looked and feel this is such a simple thing that it should be obvious. I'm wanting to make sure only the person who added an event can modify it. Simple! I already have a datasource that has event_added_by as a data point. It is populating a FormView. SelectCommand="SELECT * FROM [tbl_events] WHERE ([event_ID] = @event_ID)" And I have Page.User.Identity.Name. How do I compare the two? I can't pull the value from the label in the FormView so I need to find another way. if (!IsPostBack) { string uname = Page.User.Identity.Name; string owner = ""// this is where I need to grab the value from dsEvents; if (uname != owner) { //Send them somewhere saying they're not allowed to be here } } TIA for any help!

    Read the article

  • Unmangling the result of std::type_info::name

    - by terminus
    I'm currently working on some logging code that supposed to - among other things - print information about the calling function. This should be relatively easy, standard C++ has a type_info class. This contains the name of the typeid'd class/function/etc. but it's mangled. It's not very usefull. I.e. typeid(std::vector).name() returns "St6vectorIiSaIiEE". Is there a way to produce something usefull from this? Like 'std::vector' for the above example. If it only works for non-template classes, that's fine too. The sollution should work for gcc, but it would be better if I could port it. It's for logging so it's not so important that it can't be turned of, but it should be helpfull for debugging.

    Read the article

  • client computer name

    - by Anup Prakash
    After getting the client(Website user) IP address. Now i want to go one step ahead by knowing the Computer name of the user. So, agian i need help from my question viewer to help me regarding computer name of the client(website user). I tried it by myself using google. But at last i thought it is better to ask to all of you who have better and best answers. Thanx again to see my query. And much much thanx for them who are answering this question.

    Read the article

  • Input checkbox name converts period signs into underlines on post

    - by Rakoon
    Hello I am working on an image gallery at the moment. When a user is logged in, an x appears over each image and a checkbox next to it to enable the user to delete that image. Only if the checkbox is checked will the image be deleted. They are both in a (one for each image in the gallery), the small image "x.gif" is an input type="image" that submits the $_POST form. The checkbox inherits the name of the image and is to prevent accidentally pressing the x button and deleting an image. The problem is that the checkbox name, upon posting it gets converted from (for instance) "Image.jpg" to "Image_jpg" When i test it with print_r($_POST); Should I create code for replacing _jpg or _gif into .jpg and .gif after the post or is there a way to make it possible to use period signs in input names? Any help is greatly appreciated.

    Read the article

  • g:countrySelect with full country name as value

    - by Sheldon
    I want to store the exact country name using g:countrySelect. Example Germany instead of DEU. It is the value in the drop down menu. The drop down text is Germany but when it saves it to the database it changes back to the country code. Sorry if I am somewhat naive but I have been searching for almost 3 hours for solutions and it isn't well documented at the grails website. I could opt for any alternative even ajax. Just to have an easy way to display a list of countries and will be able to store the REAL NAME of the country NOT country code. Thank you!

    Read the article

  • Function name inside a variable

    - by John Doe
    Hello. I have a simple question (i guess). I'm getting the name of the function inside a variable from database. After that, i want to run the specific function. How can i echo the function's name inside the php file? The code is something like this: $variable= get_specific_option; //execute function $variable_somesuffix(); The "somesuffix" will be a simple text. I tried all the things i had in mind but nothing worked.

    Read the article

  • c# Create a unique name with a GUID

    - by Dave Rook
    I am creating a back up solution. I doubt there is anything new in what I'm trying to achieve. Before copying the file I want to take a backup of the destination file in case anything becomes corrupt. This means renaming the file. I have to be careful when renaming in case the file already exists and adding a 01 to the end is not safe. My question is, based upon not finding the answer else where, would adding a GUID to the file name work. So, if my file was called file01.txt, renaming the file to file01.txtGUID (where GUID is the generated GUID), I could then perform my back up of that file (at this instance having 2 back ups) and then, after ensuring the file has copied (by comparing length of file to the source), delete the file with the GUID in the name. I know the GUID is not 100% guaranteed to be unique but would this suffice?

    Read the article

  • User.Identity.Name returning NT AUTHORITY\NETWORK SERVICE i want Domain\USER

    - by Jalvemo
    in my asp.net MVC project i have an database connection with connectionstring: Data Source=.;Initial Catalog=dbname;Integrated Security=True All users can execute Stored Procedures on that connection and i want to log those users. so after each execution I store "User.Identity.Name" to another database. This work great on my development machine but after deployment, to access the site i have to go through a VPN-connention and then remote desktop to the same server that the IIS is running on and use a web-browser there. Then i get User.Identity.Name: "NT AUTHORITY\NETWORK SERVICE". i would expect it to be the credentials i entered in remote desktop that have access to the database. any idea how i can get this to work? iis6 authentication: "windows authentication: enabled" web.config:

    Read the article

  • Search for nodes by name in XmlDocument

    - by RajenK
    I'm trying to find a node by name in an XmlDocument with the following code: private XmlNode FindNode(XmlNodeList list, string nodeName) { if (list.Count > 0) { foreach (XmlNode node in list) { if (node.Name.Equals(nodeName)) return node; if (node.HasChildNodes) FindNode(node.ChildNodes, nodeName); } } return null; } I call the function with: FindNode(xmlDocument.ChildNodes, "somestring"); For some reason it always returns null and I'm not really sure why. Can someone help me out with this?

    Read the article

  • Google maps in iPhone - city & State name by Longitude & Latitude

    - by sugar
    I have developed an application in which the data About Schools are stored in ASP.NET Web Server. The database has following values. =School Name = Longitude of School = Latitude of School. Now, I retrieve all the data in iPhone through web-service & NSURLRequest. Now, Following is my Problem. When user Clicks on a school ( in tableView ). Google map should be load - ( i can do that ) A pin should be dropped at the place - ( i can do that ) A pin title should be with City & State name - ( i can't do ) Thanks in advance for helping me.

    Read the article

< Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >