Search Results

Search found 910 results on 37 pages for 'ace pace'.

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

  • asp.net regex to find anchor tags and replace their url

    - by ace
    Hi -i'm trying to find all the anchor tags and appending the href value with a variable. for example <a href="/page.aspx">link</a> will become <a href="/page.aspx?id=2"> <A hRef='http://www.google.com'><img src='pic.jpg'></a> will become <A hRef='http://www.google.com?id=2'><img src='pic.jpg'></a> I'm able to match all the anchor tags and href values using regex, then i manually replace the values using string.replace, however i dont think its the efficient way to do this. Is there a solution where i can use something like regex.replace(html,newurlvalue)

    Read the article

  • Custom annotations to configure tests

    - by ace
    First of al let me start off by saying I think custom annotations can be used for this but i'm not totally sure. I would like to have a set of annotations that I can decorate some test classes with. The annotations would allow me to configure the test for different environments. Example: public class Atest extends BaseTest{ private String env; @Login(environment=env) public void testLogin(){ //do something } @SignUp(environment=env) public void testSignUp(){ //do something } } The idea here would be that the login annotation would then be used to lookup the username and password to be used in the testLogin method for testing a login process for a particular environment. So my question(s) is this possible to do with annotations? If so I have not been able to find a decent howto online to do something like this. Everything out there seems to be your basic here's how to do your custom annotations and a basic processor but I haven't found anything for a situation like this. Ideas?

    Read the article

  • Drupal: Programmatically saving imagefield images

    - by Ace
    Hey there! I'm trying to write a sync function that saves some data to nodes, which works fine, until I try to save the thumbnail image associated with the node. I've managed to download the file and put it in my sites/default/files folder, but what's the best way to tell Drupal, "put this file in that CCK imagefield"? EDIT To clarify a bit.. I sync the thumbnails separately (since one image can be used by several nodes)... I would like the initial thumbnail sync to save the files in the correct folder (not a temp one) and just point the imagefield to this file... That's what annoys me with field_file_save_file(), it saves a new file instead of just making a pointer.. Any advice?

    Read the article

  • the problem only happens when i try create a release...

    - by ace
    I'm sorry if im not presenting this right, but i trully cannot understand what the problem is. i have a project to hand in, a code of 600 lines defined within a main, .cpp, and header file. if i compile the project with just a debugger and no release, it's fine. when i create it with the release, the following error occurs, for every function!!! 1st error: |36|multiple definition of `countLines(int&, std::vector const&)'| 2nd error: |36|first defined here| if someone will allow me and i can send them the entire code, that would be awesome - i have to have this done within 3 hours.

    Read the article

  • Syntax Error? When parsing XML value

    - by Ace Munim
    I don't know if I'm having a syntax error but the compiler is giving me TypeError: 'undefined' is not an object (evaluating 'xmlDoc.getElementsByTagName("icon")[i].childNodes') Its me giving me this problem when im parsing the XML from my server, my actual javascript code is like this var xmlDoc = Obj.responseXML; var count = 0; if(xmlDoc){ while(count <= xmlDoc.getElementsByTagName("item").length){ document.getElementById("flow").innerHTML += "<div class='item'><img class='content' src='" + xmlDoc.getElementsByTagName("icon")[i].childNodes[0].nodeValue.replace(/\s+$/g,' ') +"' /></div>"; count++; } }else{ alert("Unable to parse!"); } and my XML goes like this. <feed> <item> <title>Given Title</title> <icon> http://i178.photobucket.com/albums/w255/ace003_album/Logo-ETC-RGB-e1353503652739.jpg </icon> </item> <item>...</item> <item>...</item> <item>...</item> <item>...</item> <item>...</item> <item>...</item> </feed> i just want to parse the image link and to show it.

    Read the article

  • Entity Framework 4 with Existing Domain Model

    - by ace
    Hi, Im currently looking at migrating from fluent nHibernate to ADO.Net Entity Framework 4. I have a project containing the domain model (pocos) which I was using for nHibernate mappings. Ive read in blogs that it is possible to use my existing domain model with EF4 but ive seen no examples of it. Ive seen examples of T4 code generation with EF4 but havent come accross an example which shows how to use existing domain model objects with EF4. Im a newby with EF4 and would like to see some samples on how to get this done. Thanks Aiyaz

    Read the article

  • Open a file:// protocol with UNC paths in HTML page

    - by ace
    Hi - I'm trying to open a file located on a networkshare by giving the anchor tag path = file://///servername/folder/file.docx This works in IE8 and i'm able to open the file in word, however in Firefox nothing happens. I believe it's due to some secruity settings in Firefox. I tried about:config and turning off the checkloaduri value. But it didnt solve the problem. Does anyone know how I can make this work in both IE and Firefox.

    Read the article

  • LINQ nested joins

    - by ace
    Im trying to convert a SQL join to LINQ. I need some help in getting the nested join working in LINQ. This is my SQL query, Ive cut it short just to show the nested join in SQL: LEFT OUTER JOIN dbo.TaskCommentRecipient RIGHT OUTER JOIN dbo.TaskComment ON dbo.TaskCommentRecipient.TaskCommentID = dbo.TaskComment.TaskCommentID ON dbo.Task.Taskid = dbo.TaskComment.TaskCommentTaskId

    Read the article

  • Drupal - Views + node preview woes

    - by Ace
    Hey there! I have a few Views on my Drupal 6 site which take care of some of a node's fields. For example, I have a content type called Country, which has a field called Capital. I've excluded this field in the node display, but there is a view that takes the node ID as an argument and displays it in the right column. This is all very pretty and has been working out well for me, but how do I take care of the node preview mode? Since the node isn't saved yet, the Capital field won't have its new value yet. Note: I am ready to do some very dirty hacks to make this work :)

    Read the article

  • how to load a file into a blob without loading into RAM first?

    - by Ace Grace
    Hi, I am using C# and I am having trouble loading large files into a binary field use byte arrays. Basically, if I load a file that is too large, I get memory problems. Is there a way to load a file into a binary field without using large amounts of ram, i.e. avoid loading the file into memory first? If it helps, I am using Advantage Database Server and this is using a winforms app not a web app. Regards

    Read the article

  • how to init binary buffer in python

    - by ace
    so, I read from DB binary field i.e. 'field1' to var Buf1, and then do something like: unpack_from('I', Buf1, 0) so, all is ok. but question is how can I ini Buf1 without going to DB? I can get value from DB manually and init my var statically, but how? in DB field 'field1' I see something like '0x7B0500000100000064000000B80100006'. and how can I init valid binary buffer from it?

    Read the article

  • How to modify raw HTML of ASP.NET page on PreRender?

    - by ace
    I want to access the raw HTML code that my ASP.NET System.Web.UI.Page is about to render. How can i do that? Is there a property or method like System.Web.UI.Page.HTML or something like that. I know I could loop through the Controls List of the page and get access to all the Literal Controls etc, but I was wondering if there's a direct property or method that can return me the raw html, which I can modify just before rendering the page.

    Read the article

  • Way around ASP.NET session being shared across multiple tab windows

    - by ace
    I'm storing some value in an asp.net session on the first page. On the next page, this session value is being read. However if multiple tabs are opened and there are multiple page 1-page 2 navigation going on, the value stored in session gets mixed up since the session is shared between the browser tabs. I'm wondering what are the options around this : Query String: Passing value between the pages using query string, I don't want to take this approach since there can be multiple anchor tags on page 1 linking to page 2 and I can not rewrite the URLs of each tag since they are dynamic. Cookies??? In-memory cookies are shared across browser tabs too, same as the session cookie, rite ? Any other option?

    Read the article

  • Alfresco 3 Labs: Adding a thumbnail to a document

    - by Ace
    Hey guys! Any Alfresco experts out there? I have created a document type in Alfresco and am trying to associate it with an image -- Somehow. I don't really mind how it's done - an image uploader in the metadata section when saving the actual document would be nice, but I can live with having to upload the image first and then associating it somehow with the document. Any ideas..?

    Read the article

  • Can I tell sitecrawlers to visit a certain page?

    - by Ace
    Hi there! I have this drupal website that revolves around a document database. By design you can only find these documents by searching the site. But I want all the results to be indexed by Googlebot and other crawlers, so I was thinking, what if I make a page that lists all the documents, and then tell the robots to visit the page to index all my documents..? Is this possible, or is there a better way to do it?

    Read the article

  • How to take a NSString such as, "0+1+2", get the sum of those and create new string. Obj-C

    - by Ace Legend
    Alright. My app has a text field and next to it are two buttons (Plus button and Equals button). When you press the "Plus" button, it takes the text inside of the textField and adds a "+" to it. Code below: - (IBAction)plusButtonPressed:(id)sender { NSString *plusString = @"+"; NSString *inputString = carbsField.text; NSString *outputString = [NSString stringWithFormat:@"%@%@",inputString,plusString]; NSLog(@"%@",outputString); [carbsField setText:outputString]; } I will eventually make that more intelligent so that I can't put two pluses or whatever. Anyway, then I want the equal button to take whatever is in the textField, which should look something like: "23+54+2.2" and get the sum of those values. I believe I know how to take an Integer and make it a String, but I want to verify it: int *value = 56; NSString *string = @"%d",value; Well, if anyone can show me how to do this, I would be very appreciative. Thanks. EDIT At the moment, I have not tried anything. This is because I do not know where to start. I have an idea of what to do, but I do not know how to execute it. I believe I need to get all characters before a "+" convert them into int and then get the sum of some array of those values.

    Read the article

  • boost::asio::io_service throws exception

    - by Ace
    Okay, I seriously cannot figure this out. I have a DLL project in MSVC that is attempting to use Asio (from Boost 1.45.0), but whenever I create my io_service, an exception is thrown. Here is what I am doing for testing purposes: void run() { boost::this_thread::sleep(boost::posix_time::seconds(5)); try { boost::asio::io_service io_service; } catch (std::exception & e) { MessageBox(NULL, e.what(), "Exception", MB_OK); } } BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { if (fdwReason == DLL_PROCESS_ATTACH) { boost::thread thread(run); } return TRUE; } This is what the message box shows: winsock: WSAStartup cannot function at this time because the underlying system it uses to provide network services is currently unavailable Here is what MSDN says about it (error code 10091, WSASYSNOTREADY): Network subsystem is unavailable. This error is returned by WSAStartup if the Windows Sockets implementation cannot function at because the underlying system it uses to provide network services is currently unavailable. Users should check: That the appropriate Windows Sockets DLL file is in the current path. That they are not trying to use more than one Windows Sockets implementation simultaneously. If there is more than one Winsock DLL on your system, be sure the first one in the path is appropriate for the network subsystem currently loaded. The Windows Sockets implementation documentation to be sure all necessary components are currently installed and configured correctly. Yet none of this seems to apply to me (or so I think). Here is my command line: /O2 /GL /D "_WIN32_WINNT=0x0501" /D "_WINDLL" /FD /EHsc /MD /Gy /Fo"Release\" /Fd"Release\vc90.pdb" /W3 /WX /nologo /c /TP /errorReport:prompt If anyone knows what might be wrong, please help me out! Thanks.

    Read the article

  • why does vector.size() read in one line too little?

    - by ace
    when running the following code, the amount of lines will read on less then there actually is (if the input file is main itself, or otherwise) why is this and how can i change that fact (besides for just adding 1)? #include <fstream> #include <iostream> #include <string> #include <vector> using namespace std; int main() { // open text file for input string file_name; cout << "please enter file name: "; cin >> file_name; // associate the input file stream with a text file ifstream infile(file_name.c_str()); // error checking for a valid filename if ( !infile ) { cerr << "Unable to open file " << file_name << " -- quitting!\n"; return( -1 ); } else cout << "\n"; // some data structures to perform the function vector<string> lines_of_text; string textline; // read in text file, line by line while (getline( infile, textline, '\n' )) { // add the new element to the vector lines_of_text.push_back( textline ); // print the 'back' vector element - see the STL documentation cout << "line read: " << lines_of_text.back() << "\n"; } cout<<lines_of_text.size(); return 0; }

    Read the article

  • to count specific things within a c++ code

    - by ace
    i know this connects to my original question but i put it here so it is seen by people afresh. after passing each line of the code into a string, how can i count the following things: --the number of standalone functions and member functions per class --the number of lines per function?

    Read the article

  • Could someone explain Spring Security BasePermission.Create?

    - by Matthew Sowders
    I am working on a project that involves Spring Security ACL and I came across the create permission BasePermission.CREATE. Would someone please explain how this is supposed to work or what it allows someone to do? It is my understanding that each object has an acl, and each acl has many ace's, and each ace has an sid and a permission. How can you grant permission on an object to create it, if it must be created in order to attach the acl to it?

    Read the article

  • How can I fill SQL Server table from excel only using sql query?

    - by Phsika
    How can I do that with Microsoft.ACE.OLEDB.12.0? CREATE TABLE [dbo].[Addresses_Temp] ( [FirstName] VARCHAR(20), [LastName] VARCHAR(20), [Address] VARCHAR(50), [City] VARCHAR(30), [State] VARCHAR(2), [ZIP] VARCHAR(10) ) GO INSERT INTO [dbo].[Address_Temp] ( [FirstName], [LastName], [Address], [City], [State], [ZIP] ) SELECT [FirstName], [LastName], [Address], [City], [State], [ZIP] FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=C:\Source\Addresses.xlsx;IMEX=1', 'SELECT * FROM [Sayfa1$]') How can I do that?

    Read the article

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