Search Results

Search found 55188 results on 2208 pages for 'text based'.

Page 9/2208 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • How to set up different documentroot for ip based requests, and different for domain based requests

    - by Carlos
    My problem is simply that I have a domain, let's say example.com, and my server's ip address is e.g. 192.168.0.1. I want to set up 2 different virtual hosts, so when user enters ip address (192.168.0.1) in his browser, he will see content from here: /var/www/staging But if user will type example.com, he will see content from here: /var/www I think it's possible but I was playing around with it and couldn't make it work. Also I don't want to make simple redirection. I know I can, but I need both of my apps (live & staging) working in root on the same server. I can't buy second domain, and I can't associate new ip address.

    Read the article

  • Docs for OpenSSH CA-based certificate based authentication

    - by Zoredache
    OpenSSH 5.4 added a new method for certificate authentication (changes). * Add support for certificate authentication of users and hosts using a new, minimal OpenSSH certificate format (not X.509). Certificates contain a public key, identity information and some validity constraints and are signed with a standard SSH public key using ssh-keygen(1). CA keys may be marked as trusted in authorized_keys or via a TrustedUserCAKeys option in sshd_config(5) (for user authentication), or in known_hosts (for host authentication). Documentation for certificate support may be found in ssh-keygen(1), sshd(8) and ssh(1) and a description of the protocol extensions in PROTOCOL.certkeys. Is there any guides or documentation beyond what is mentioned in the ssh-keygen man-page? The man page covers how to generate certificate and use them, but it doesn't really seem to provide much information about the certificate authority setup. For example, can I sign the keys with an intermediate CA, and have the server trust the parent CA? This comment about the new feature seems to mean that I could setup my servers to trust the CA, then setup a method to sign keys, and then users would not have to publish their individual keys on the server. This also seems to support key expiration, which is great since getting rid of old/invalid keys is more difficult then it should be. But I am hoping to find some more documentation about describe the total configuration CA, SSH server, and SSH client settings needed to make this work.

    Read the article

  • Not able to compile dbus-ping-pong

    - by Mahipal
    I have downloaded files from http://cgit.collabora.com/git/user/alban/dbus-ping-pong.git/tree/ I am trying to compile it using the command gcc pkg-config --libs --cflags dbus-1 dbus-glib-1-2 glib-2.0 -o dbus-ping-pong dbus-ping-pong.c However, I get errors: /tmp/ccmJkxXb.o: In function g_once_init_enter: dbus-ping-pong.c:(.text+0x22): undefined reference to g_once_init_enter_impl /tmp/ccmJkxXb.o: In function dbus_glib_marshal_echo_srv__BOOLEAN__STRING_POINTER_POINTER: dbus-ping-pong.c:(.text+0x52): undefined reference to g_return_if_fail_warning dbus-ping-pong.c:(.text+0x79): undefined reference to g_return_if_fail_warning dbus-ping-pong.c:(.text+0x9d): undefined reference to g_value_peek_pointer dbus-ping-pong.c:(.text+0xac): undefined reference to g_value_peek_pointer dbus-ping-pong.c:(.text+0x109): undefined reference to g_value_set_boolean /tmp/ccmJkxXb.o: In function echo_ping_class_intern_init: dbus-ping-pong.c:(.text+0x122): undefined reference to g_type_class_peek_parent /tmp/ccmJkxXb.o: In function echo_ping_get_type: dbus-ping-pong.c:(.text+0x162): undefined reference to g_intern_static_string dbus-ping-pong.c:(.text+0x192): undefined reference to g_type_register_static_simple dbus-ping-pong.c:(.text+0x1a8): undefined reference to g_once_init_leave /tmp/ccmJkxXb.o: In function echo_ping_class_init: dbus-ping-pong.c:(.text+0x1cd): undefined reference to g_type_class_add_private dbus-ping-pong.c:(.text+0x1e2): undefined reference to dbus_g_object_type_install_info /tmp/ccmJkxXb.o: In function echo_ping_init: dbus-ping-pong.c:(.text+0x1fe): undefined reference to g_type_instance_get_private /tmp/ccmJkxXb.o: In function echo_ping: dbus-ping-pong.c:(.text+0x21d): undefined reference to g_strdup /tmp/ccmJkxXb.o: In function client: dbus-ping-pong.c:(.text+0x265): undefined reference to dbus_g_proxy_new_for_name dbus-ping-pong.c:(.text+0x2c3): undefined reference to dbus_g_proxy_call dbus-ping-pong.c:(.text+0x2d1): undefined reference to dbus_g_error_quark dbus-ping-pong.c:(.text+0x2f1): undefined reference to dbus_g_error_get_name dbus-ping-pong.c:(.text+0x305): undefined reference to g_printerr dbus-ping-pong.c:(.text+0x31d): undefined reference to g_printerr dbus-ping-pong.c:(.text+0x328): undefined reference to g_error_free dbus-ping-pong.c:(.text+0x358): undefined reference to g_print dbus-ping-pong.c:(.text+0x363): undefined reference to g_free /tmp/ccmJkxXb.o: In function main: dbus-ping-pong.c:(.text+0x38f): undefined reference to g_type_init dbus-ping-pong.c:(.text+0x3a3): undefined reference to dbus_g_bus_get dbus-ping-pong.c:(.text+0x3c7): undefined reference to g_object_new dbus-ping-pong.c:(.text+0x3df): undefined reference to g_type_check_instance_cast dbus-ping-pong.c:(.text+0x3f9): undefined reference to dbus_g_connection_register_g_object dbus-ping-pong.c:(.text+0x406): undefined reference to dbus_g_connection_get_connection dbus-ping-pong.c:(.text+0x426): undefined reference to dbus_bus_request_name dbus-ping-pong.c:(.text+0x43a): undefined reference to g_main_loop_new dbus-ping-pong.c:(.text+0x44a): undefined reference to g_main_loop_run How do I resolve this issue ?

    Read the article

  • Draw underlined / strikethrough text ( MULTILINE STRING ) ?

    - by Madhup
    Hi, I have to draw underlined-multiline text with all types of text alignment. I have searched on forums and got some results like: http://davidjhinson.wordpress.com/2009/11/26/underline-text-on-the-iphone/ http://forums.macrumors.com/showthread.php?t=561572 But all draw text for single line only. while i have multi-line text. The situation even become worse when the text alignment is centered. I searched and found that in iphone-sdk-3.2 there are some core-text attributes for underlining a text but no idea how to use that. Besides if I use these my problem would not be solved fully. As I have to draw strikethrough text also. Anybody having idea about this please help.

    Read the article

  • delphi insert update record´s

    - by ml
    Hi friends what is that im doing wrong because it goes and goes on LOOP var ii: Integer; i: Integer; j: Integer; ie : integer; je : integer; fileSource, fileDest: string; Fo : TSHFileOpStruct; buffer : array[0..4096] of char; p : pchar; dirFile: String; dirFile1: String; dirFile11: String; begin dirFile1 := (Dirlocal + 'Vibrometria\'+ClienteN.text+'\'); dirFile := (localAplicação+ 'Vibrometria\'+ClienteN.text+'\'+NInterv.text ) ; dirFile11:= Dirlocal+'Vibrometria\'; if ForceDirectories(dirFile11) then if ForceDirectories(dirFile1) then //...................................................................... begin ShowMessage('Vai devolver "'+cxDBTextEdit5.Text+'..........' +obra.Text); Sub_TRelFinal.First; Begin ADOTable_casa.First; Begin begin Sub_TRelFinal.Edit; //Tabela1Codoco.Value := Tabela2Codoco.Value; Sub_TRelFinal.FieldByName('Foto1').text := ADOTable_casa.FieldByName('Foto1').text; Sub_TRelFinal.FieldByName('Obra').text := ADOTable_casa.FieldByName('Obra').text; Sub_TRelFinal.FieldByName('OBS1').text := ADOTable_casa.FieldByName('OBS1').text; Sub_TRelFinal.FieldByName('Data_VisitaLocal').text := ADOTable_casa.FieldByName('Data_VisitaLocal').text; Sub_TRelFinal.FieldByName('ContractoN').text := ADOTable_casa .FieldByName('ContractoN').text;; Sub_TRelFinal.FieldByName('Cliente').text := ADOTable_casa .FieldByName('Cliente').text; Sub_TRelFinal.FieldByName('Morada').text := ADOTable_casa .FieldByName('Morada').text; Sub_TRelFinal.FieldByName('localizacao').text:= ADOTable_casa .FieldByName('localizacao').text; Sub_TRelFinal.FieldByName('Intruducao').text:= ADOTable_casa .FieldByName('Intruducao').text; Sub_TRelFinal.FieldByName('Analise').text := ADOTable_casa.FieldByName('Analise').text; Sub_TRelFinal.Post; end; End; end; //iniciar inserção registos sub Sub_TRelFinal_1.First; For j := 1 to Sub_TRelFinal_1.RecordCount do Begin ADOTable_casa_sub_1.First; For i := 1 To ADOTable_casa_sub_1.RecordCount Do Begin begin Sub_TRelFinal_1.Edit; //Tabela1Codoco.Value := Tabela2Codoco.Value; Sub_TRelFinal_1.FieldByName('Foto1').text := ADOTable_casa_sub_1.FieldByName('Foto1').text; Sub_TRelFinal_1.FieldByName('Obra').text := ADOTable_casa_sub_1.FieldByName('Obra').text; Sub_TRelFinal_1.FieldByName('OBS1').text := ADOTable_casa_sub_1.FieldByName('OBS1').text; Sub_TRelFinal_1.FieldByName('Data_VisitaLocal').text := ADOTable_casa_sub_1.FieldByName('Data_VisitaLocal').text; Sub_TRelFinal_1.FieldByName('ContractoN').text := ADOTable_casa_sub_1.FieldByName('ContractoN').text; Sub_TRelFinal_1.FieldByName('Cliente').text := ADOTable_casa_sub_1.FieldByName('Cliente').text; Sub_TRelFinal_1.FieldByName('Morada').text := ADOTable_casa_sub_1.FieldByName('Morada').text; Sub_TRelFinal_1.FieldByName('localizacao_eq').text:= ADOTable_casa_sub_1.FieldByName('localizacao_eq').text; Sub_TRelFinal_1.FieldByName('Equipamento').text:= ADOTable_casa_sub_1.FieldByName('Equipamento').text; Sub_TRelFinal_1.FieldByName('tipo_equip').text := ADOTable_casa_sub_1.FieldByName('tipo_equip').text; Sub_TRelFinal_1.Post; end; //iniciar inserção registos subsub SubTRelFinal_sub.First; For ie := 1 to SubTRelFinal_sub.RecordCount do Begin ADOTable_casa_sub_Sub.First; For je := 1 To ADOTable_casa_sub_Sub.RecordCount Do begin SubTRelFinal_sub.Edit; //Tabela1Codoco.Value := Tabela2Codoco.Value; SubTRelFinal_sub.FieldByName('Foto1').text := ADOTable_casa_sub_Sub.FieldByName('Foto1').text; SubTRelFinal_sub.FieldByName('Foto2').text := ADOTable_casa_sub_Sub.FieldByName('Foto2').text; SubTRelFinal_sub.FieldByName('Analisefoto1').text := ADOTable_casa_sub_Sub.FieldByName('Analisefoto1').text; SubTRelFinal_sub.FieldByName('Observações').text := ADOTable_casa_sub_Sub.FieldByName('Observações').text;; SubTRelFinal_sub.FieldByName('ContractoN').text := ADOTable_casa_sub_Sub.FieldByName('ContractoN').text; SubTRelFinal_sub.FieldByName('OBS3').text := ADOTable_casa_sub_Sub.FieldByName('OBS3').text; SubTRelFinal_sub.FieldByName('OBS4').text := ADOTable_casa_sub_Sub.FieldByName('OBS4').text; SubTRelFinal_sub.FieldByName('OBS2').text := ADOTable_casa_sub_Sub.FieldByName('OBS2').text; SubTRelFinal_sub.FieldByName('OBS1').text := ADOTable_casa_sub_Sub.FieldByName('OBS1').text; SubTRelFinal_sub.FieldByName('Localização').text := ADOTable_casa_sub_Sub.FieldByName('Localização').text; SubTRelFinal_sub.FieldByName('Tipo_equipamento').text:= ADOTable_casa_sub_Sub.FieldByName('Tipo_equipamento').text; SubTRelFinal_sub.FieldByName('Analisefoto101').text:= ADOTable_casa_sub_Sub.FieldByName('Analisefoto101').text; SubTRelFinal_sub.FieldByName('Analisefoto201').text := ADOTable_casa_sub_Sub.FieldByName('Analisefoto201').text; SubTRelFinal_sub.FieldByName('GrauAnomalia').text := ADOTable_casa_sub_Sub.FieldByName('GrauAnomalia').text; SubTRelFinal_sub.Post; end; ADOTable_casa_sub_Sub.Next; End; SubTRelFinal_sub.Next; End; ADOTable_casa_sub_1.Next; End; Sub_TRelFinal_1 .Next;

    Read the article

  • Transitioning from desktop app written in C++ to a web-based app

    - by Karim
    We have a mature Windows desktop application written in C++. The application's GUI sits on top of a windows DLL that does most of the work for the GUI (it's kind of the engine). It, too, is written in C++. We are considering transitioning the Windows app to be a web-based app for various reasons. What I would like to avoid is having to writing the CGI for this web-based app in C++. That is, I would rather have the power of a 4G language like Python or a .NET language for creating the web-based version of this app. So, the question is: given that I need to use a C++ DLL on the backend to do the work of the app what technology stack would you recommend for sitting between the user's browser and are C++ dll? We can assume that the web server will be Windows. Some options: Write a COM layer on top of the windows DLL which can then be access via .NET and use ASP.NET for the UI Access the export DLL interface directly from .NET and use ASP.NET for the UI. Write a custom Python library that wraps the windows DLL so that the rest of the code can be written. Write the CGI using C++ and a C++-based MVC framework like Wt Concerns: I would rather not use C++ for the web framework if it can be avoided - I think languages like Python and C# are simply more powerful and efficient in terms of development time. I'm concerned that my mixing managed and unmanaged code with one of the .NET solutions I'm asking for lots of little problems that are hard to debug (purely anecdotal evidence for that) Same is true for using a Python layer. Anything that's slightly off the beaten path like that worries me in that I don't have much evidence one way or the other if this is a viable long term solution.

    Read the article

  • How to implement behavior in a component-based game architecture?

    - by ghostonline
    I am starting to implement player and enemy AI in a game, but I am confused about how to best implement this in a component-based game architecture. Say I have a following player character that can be stationary, running and swinging a sword. A player can transit to the swing sword state from both the stationary and running state, but then the swing must be completed before the player can resume standing or running around. During the swing, the player cannot walk around. As I see it, I have two implementation approaches: Create a single AI-component containing all player logic (either decoupled from the actual component or embedded as a PlayerAIComponent). I can easily how to enforce the state restrictions without creating coupling between individual components making up the player entity. However, the AI-component cannot be broken up. If I have, for example, an enemy that can only stand and walk around or only walks around and occasionally swing a sword, I have to create new AI-components. Break the behavior up in components, each identifying a specific state. I then get a StandComponent, WalkComponent and SwingComponent. To enforce the transition rules, I have to couple each component. SwingComponent must disable StandComponent and WalkComponent for the duration of the swing. When I have an enemy that only stands around, swinging a sword occasionally, I have to make sure SwingComponent only disables WalkComponent if it is present. Although this allows for better mix-and-matching components, it can lead to a maintainability nightmare as each time a dependency is added, the existing components must be updated to play nicely with the new requirements the dependency places on the character. The ideal situation would be that a designer can build new enemies/players by dragging components into a container, without having to touch a single line of engine or script code. Although I am not sure script coding can be avoided, I want to keep it as simple as possible. Summing it all up: Should I lob all AI logic into one component or break up each logic state into separate components to create entity variants more easily?

    Read the article

  • How should I structure the implementation of turn-based board game rules?

    - by Setzer22
    I'm trying to create a turn-based strategy game on a tilemap. I'm using design by component so far, but I can't find a nice way to fit components into the part I want to ask. I'm struggling with the "game rules" logic. That is, the code that displays the menu, allows the player to select units, and command them, then tells the unit game objects what to do given the player input. The best way I could thing of handling this was using a big state machine, so everything that could be done in a "turn" is handled by this state machine, and the update code of this state machine does different things depending on the state. However, this approach leads to a large amount of code (anything not model-related) going into a big class. Of course I can subdivide this big class into more classes, but it doesn't feel modular and upgradable enough. I'd like to know of better systems to handle this in order to be able to upgrade the game with new rules without having a monstruous if/else chain (or switch / case, for that matter). Any ideas? What specific design pattern other than MVC should I be using?

    Read the article

  • Documenting a policy based design

    - by academicRobot
    I'm re-working some prototype code into a policy based design in C++, and I'm wondering what the best practice is for documenting the design. My current plan is to document: Policy hierarchy Overview of each policy Description of each type/value/function in each policy I was thinking of putting this into a doxygen module, but this looks like it will be a bit awkward since formatting will have to be done by hand without code to base the doc on (that is, documenting the policies rather than the implementation of the policies). So my questions are: Are there other aspects of the design that should be documented? Are there any tricks to doing this efficiently in doxygen? Is there a tool other than doxygen thats better suited to this? What are some examples of well documented policy based design? This is my first serious attempt at policy based design. I think I have a working grasp of the principles, but whatever naivety I expose in this question is fair game for an answer too.

    Read the article

  • Web based interface for open SSL client certificates

    - by Felix
    Hi there! We are currently developing a apache2-based web application and want to invite some beta testers to give it a try. To be on the safe side, access should be provided by individual browser certificates (.p12) which are issued using a (fake) CA. Our users should be passing a complete register/login process and some of them will be granted administrative privileges within the application. That's why a preceding simple web-based authentication won't be sufficient. Atm, I using a serverside shellscript to generate the certificates each time. Do you know about a small, web-based tool to simplify the process of generating / revoking those certificates? Maybe an overview of the CA's index.txt plus the option to revoke a cert and a link to download them directly?

    Read the article

  • How to implement a component based system for items in a web game.

    - by Landstander
    Reading several other questions and answers on using a component based system to define items I want to use one for the items and spells in a web game written in PHP. I'm just stuck on the implementation. I'm going to use a DB schema suggested in this series (part 5 describes the schema); http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/ This means I'll have an items table with generic item properties, a table listing all of the components for an item and finally records in each component table used to make up the item. Assuming I can select the first two together in a single query, I'm still going to do N queries for each component type. I'm kind of fine with this because I can cache the data into memcache and check there first before doing any queries. I'll need to build up the items on every request they are used in so the implementation needs to be on the lean side even if they're pulled from memcache. But right there is where I feel confident about implementing a component system for my items ends. I figure I'd need to bring attributes and behaviors into the container from each component it uses. I'm just not sure how to do that effectively and not end up writing a lot of specialized code to deal with each component. For example an AttackComponent might need to know how to filter targets inside of a battle context and also maybe provide an attack behavior. That same item might also have a UsableComponent which allows the item to be used and apply some effect onto a different set of targets filtered differently from the same battle context. Then not every part of an item is an active part, an AttributeBonusComponent might need to only kick in when the item is in an equipped state or when displaying the item details page. Ultimately, how should I bring all of the components together into the container so when I use an item as a weapon I get the correct list of targets? Know when a weapon can also be used as an item? Or to apply the bonuses the item provides to a character object? I feel like I've gone too far down the rabbit hole and I can't grasp onto the simple solution in front of me. (If that makes any sense at all.) Likewise if I were to implement the best answer from here I feel like I'd have a lot of the same questions. How to model multiple "uses" (e.g. weapon) for usable-inventory/object/items (e.g. katana) within a relational database.

    Read the article

  • Making Firefox render canvas text the same as CSS text

    - by Dan Forys
    I've been experimenting with the canvas tag and Javascript. I've made a page that takes Tweets from the Twitter public timeline and animates them into view. It works by using a canvas element in the background for the animation. When the animation is complete, it creates a div element with the same text over the top. I do this so that the tweet text is selectable and links are clickable. Now, in Safari, Chrome and even Opera, the canvas text and div text look almost exactly the same. Yet in Firefox, the size of the text is different enough to make it 'jump' at the point it changes into the div. Does anyone know how to make Firefox render the text the same on the canvas element and the div using CSS? Or is this a rendering inconsistency with the engine. I have put the page on my website if you want to see what I mean. Now for the code: The CSS I'm using for rendering the div contains: line-height: 21px; font-weight: 100; font-family: Georgia, "New Century Schoolbook", "Nimbus Roman No9 L", serif; font-size: 20px; For rendering on the canvas I'm using: this.context.font = this.scale + 'px Georgia'; this.context.fillStyle = "white"; this.context.strokeStyle = 'white'; this.context.fillText(this.text, 0, 0); this.context.strokeText(this.text, 0, 0); where this.scale is an animated scale factor that finishes at 20px exactly. So, to recap, I'm using the same font and ending up at the same px size, yet Firefox renders the text differently between Canvas and CSS. (edit) Here's a screenshot example: First line is the text animating in using canvas, second line is the resulting div.

    Read the article

  • Looking for a text editor with navigation/categorization

    - by RadGH
    I've been looking for a text editor that automatically (or at least makes it easy to-) make some sort of navigation. Adobe Reader has this functionality with its bookmark system: Right now, though, I'm using Word 2007. For each section, I go Insert Bookmark, highlight the text, copy/paste the text as the link information, and it appears at the top of the document. I've made a macro to add bookmarks easier, but it's still pretty awful, and the bookmarks are still at the top of the page (rather than in the sidebar, where it's always accessible) Honestly, I would just prefer to write it in a PDF like in that screenshot. But any text editor with this type of functionality would work. It just needs basic formatting options, bold/font size, underline, images, maybe tables.

    Read the article

  • Typing the tab character in browser text boxes

    - by Rohit
    A lot of the time, when I want to format text within a web page's text box I'll hit the Tab key. Unfortunately, that doesn't insert the tab character but instead moves the control to the next form element (like a button or a check box). For browsers like Firefox/IE, is there a way to get the formatting behavior of a tab, within a text box, by typing a key combination?

    Read the article

  • Weird characters while merging text files

    - by Mirage
    When i open the text file in windows the text looks fine. But when i use text miler merger software then it shows some weird chinese characters for that files. but i reads ok the files after. how can i make all the files to same encoding so that they appear readable thanks

    Read the article

  • MS Paint: how to enter proper text?

    - by Peter Mortensen
    How do I enter normal text in Microsoft Paint? Normally I don't have any problems adding text to an image in Paint. But I ran into this problem: The text is supposed to be "abcdefd" (entered in a text editor and pasted). The same characters appear if typed directly. So apparently it is using some other character set. How do I restore normal operation? Platform: MS Paint 5.2, Windows XP Professional x64 SP2, 8 GB RAM.

    Read the article

  • Add text to every line in text file using PowerShell

    - by Joshua
    I'd like to add characters to the end of every line of text in a .txt document. #Define Variables $a = c:\foobar.txt $b = get-content $a #Define Functions function append-text { foreach-Object { add "*" } } #Process Code $b | append-text Something like that. Essentially, load a given text file, add a "*" the the end of every single line of text in that text file, save and close.

    Read the article

  • How to columnate text with tabs (in vim or on the shell)

    - by kine
    I have a frequent need to manually manipulate tab-delimited text for data entry and other purposes, and when i do this it helps if the text is aligned properly into columns. For example (assuming 4-space tabs): # original format abcdefghijklmnop field2 abcdefgh field2 abcdefghijkl field2 # ideal format abcdefghijklmnop field2 abcdefgh field2 abcdefghijkl field2 I am very familiar with using the column utility to columnate text this way, but the problem is that it uses spaces to align the columns, and i specifically need tabs. This requirement also appears to rule out the Tabularize plug-in. Is there any way that i can columnate text with tabs specifically, either within vim or at the shell? It looks like i might be able to do it with groff/tbl, but honestly i'd rather columnate it by hand than mess with that....

    Read the article

  • Advanced text search in actionscript-return ALL nouns,adjectives and verbs..

    - by eco_bach
    Hi I know that as3 has some powerful new text search capabilities, especially when combined with regex. I don't even know if this is possible, but I would like to somehow, search any block of text, and return all nouns, adjectives and verbs. What would be the best(most efficent) way to do this? Is regex an option? or would I have to load in some sort of open sourced dictionary 9as used in spellcheckers) to compare with or?? After, I've pulled all the nouns, adjectives and verbs, I need to count and prioritize by their frequency. Any suggestions welcome...

    Read the article

  • The SVG text node disappear after change its text content

    - by sureone
    svg: <text xml:space="preserve" y="228" x="349.98" text-anchor="middle" stroke-width="0" stroke-linejoin="null" stroke-linecap="null" stroke-dasharray="null" stroke="#000000" fill="#000000" style="cursor: move; pointer-events: inherit;" font-size="24" font-family="serif" id="cur_b">cur_b</text> <text xml:space="preserve" y="222" x="103.98" text-anchor="middle" stroke-width="0" stroke-linejoin="null" stroke-linecap="null" stroke-dasharray="null" stroke="#000000" fill="#000000" style="cursor: move; pointer-events: inherit;" font-size="24" font-family="serif" id="cur_a">cur_a</text> <text xml:space="preserve" y="229" x="590.0211" text-anchor="middle" stroke-width="0" stroke-linejoin="null" stroke-linecap="null" stroke-dasharray="null" stroke="#000000" fill="#000000" style="cursor: move; pointer-events: inherit;" font-size="24" font-family="serif" id="cur_c">cur_c</text> NSString* theJS = @ "var theNode0 = document.getElementById('cur_a'); theNode0.textContent='200A'; theNode0.setAttribute('fill','#FF0000'); var theNode1 = document.getElementById('cur_c'); theNode1.textContent='200A'; theNode1.setAttribute('fill','#00FF00');" [self.webView stringByEvaluatingJavaScriptFromString:theJS]; The SVG text node value is changed but disappeared after about one second.

    Read the article

  • Rendering Text with the HTML5 Canvas

    - by dwahlin
    In a previous post I walked through the fundamentals of rendering shapes such as squares and circles using the HTML5 Canvas API. In this post I’ll provide a simple example of rendering and rotating text. To render text you can use the fillText() or strokeText() functions which take the text to render as well as the x and y coordinates of where to render it. To rotate text you can use the transform functions available with the HTML5 Canvas such as save(), rotate(), and restore(). To run the live demos that follow click the Result tab in the blue bar of each demo.   Rendering Text This example provides a simple look at how text can be rendered using the HTML5 Canvas. It iterates through a loop, updates the text and font size dynamically, measures the width of the text using the measureText() function, and then calls fillText() to render the text with the desired font size to the screen.   Here’s what the code above renders:   Rotating Text This example shows how text can be rendered and even rotated by using transform functions built into the HTML5 Canvas. The code starts by rendering text the standard way using fillText(). It then saves the state of the canvas performs an x,y coordinate transform (moves to 100, 300 respectively) and then rotates the canvas –90 degrees using the rotate() function. After the text is rendered, the canvas is reverted back to it’s existing state (saved by calling the save() function) by calling the restore() function. An additional line of text is then rendered.   Here’s what the code above renders:   If you’re interested in learning more about the HTML5 Canvas and how it can be used in your Web or Windows 8 applications, check out my HTML5 Canvas Fundamentals course from Pluralsight.

    Read the article

  • Android: dynamically setting links to text in strings.xml

    - by Martyn
    I'm trying to make an app with localisation built in, but I want a way that I can create a web link within the text, the URL being defined elsewhere (for ease of maintenance). So, I have my links in res/values/strings.xml: <?xml version="1.0" encoding="utf-8"?> <resources> ... <string name="link1">http://some.link.com</string> <string name="link2">http://some.link2.com</string> </resources> and my localised text in res/values-en-rGB/strings.xml <?xml version="1.0" encoding="utf-8"?> <resources> ... <string name="sampleText">Sample text\nMore text and link1\nMore text and link2.</string> </resources> I've not tested this bit, but from the localization section of developer.android.com it says that this approach to reducing content duplication should work, although I'm not sure what folder I should put Italian, for example. Would it be in 'res/values-it-rIT/strings.xml'? Lets assume that I have various other languages too. I'm looking for a way of taking the base localised 'sampleText' and inserting my html links in, and getting them to work when clicked on. I've tried two approaches so far: 1, Putting some formatting in the 'sampleText' (%s): <string name="sampleText">Sample text\nMore text and <a href="%s">link1</a>\nMore text and <a href="%s">link2</a>.</string> and then processing the text like this: TextView tv = (TextView) findViewById(R.id.textHolder); tv.setText(getResources().getString(R.string.sampleText, getResources().getString(R.string.link1), getResources().getString(R.string.link2))); But this didn't work when I click on the link, even though the link text is being put in to the correct places. 2, I tried to use Linkify but the regular expression route may be difficult as I'm looking at supporting non-Latin based languages. I tried to put a custom xml tag around the link text and then do something like this: Pattern wordMatcher = Pattern.compile("<span1>.*</span1>"); String viewURL = "content://" + getResources().getString(R.string.someLink); Linkify.addLinks(tv, wordMatcher , viewURL ); But this didn't work either. So, I'd like to know if there's a way of dynamically adding multiple URLs to different sections of the same text which will link to web content? Thank you, Martyn

    Read the article

  • How can I sort a document according to a substring in each line on Win7?

    - by Joey Hammer
    How can I sort a text according to hashtag on Windows-7? I have a long text (.txt format) which looks something like this: Blah blah #Test 123123 #Really Blah bluh #Really klfdmngl #Test I would like to conveniently, quickly and automatically be able to sort the text so that it looks like this: Blah blah #Test klfdmngl #Test 123123 #Really Blah bluh #Really I have to do this on a daily basis so I would like to be able to do it in as few steps as possible.

    Read the article

  • Changing Text in Visio Org Chart Shape Changes Multiple Shapes' Text

    - by Eric
    I have inherited an organizational chart that was created in Visio 2003. I am updating it with Visio 2007. When changing the text in one shape, such as a person's title, multiple shapes nearby change their text to the same. For example, if I change Bob's title from Programmer to Programmer/DBA then Wendy's text will change to "Bob - Programmer/DBA". Some changes update three or four other boxes. Some changes will only update one box. My thought is the originator copied or duplicated the one box to create multiple boxes and it created some type of link between them. How do I remove this link? Thanks!

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >