Search Results

Search found 163 results on 7 pages for 'lb'.

Page 3/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • Ruby DSL experiences ?

    - by LB
    Hi, I don't know anything in Ruby, but i'm pretty interested in DSLs. And DSL seems to be a buzz word for you community. Do you actually implement DSLs in Ruby for your own purposes ? If so, how complex and how dedicated are they ? i've seen this question here, but i'm more interested in your everyday experience. thanks.

    Read the article

  • (interactive) graph as in graph theory on a web page ?

    - by LB
    Hi, I have to integrate a graph with nodes and edges on a web page. Ideally, i would like to be able to interact with it (like moving the nodes around). Actually, i'm beginning by representing trees, so i would appreciate to be able to collapse subtrees. How can I do that ? I was considering google-visualization api but i wasn't able to find the kind of visualization i'm looking for (org chart doesn't allow to have multiple fathers, if i understood well) I've got no idea of the kind of technology so my tagging may not be really accurate :-). thanks

    Read the article

  • Entity Framework Reusing Connection

    - by LB
    in a using block for a connection to the entities, How am I to reuse the connection when calling another method? so I have: using (SampleEntities entities = new SampleEntities()) { entities.Connection.Open(); SomeMethod(); ... } void SomeMethod() { using (SampleEntities entities = new SampleEntities()) { // I want to be able to use the existing connection before the method call, any ideas? } }

    Read the article

  • Unregistering COM dll with a C# Setup Project

    - by lb
    Hi All. I've been stuck on this one for a while. I'll try explain in the simplest terms and at the best of my knowledge. I will honour any help. I've got a C# project which uses a VB6 compiled ActiveX DLL that I'm constantly updating. I compile the setup project, send it to the client and they run the setup. When building the updated setup project, I would increase the 'Version' of the setup project so it wouldn't bother with 'Another version is already installed'. What started happening after a few updates I began to notice the DLL would not be updated to the new version in the installer. The client computer had the original DLL both installed and registered. First symptom: method not found exceptions from the client C# code. This is not a shared DLL and only this application needs it. I've noticed that when uninstalling the application (through the usual procedure) the DLL is also not removed from the application folder although I would set this file's property 'Permanent' to false. The registration entries in the registry are mantained also. I do update in VS6.0 the version of the DLL (usually increase the build number) before building it. Then in VS2008, I remove it from the References, and add it again from the 'Browse tab', without re-registering it on my dev machine and adding it from the COM tab. I've thought of these options. Custom step in Setup project to regsvr32.exe /u 'hardcoded path of my dll' at uninstall (ugly) Somehow find out how the 'Isolate' property can work for me without registering Find out how to execute setup project 'Conditions' that would actually check the version of the library and to update the file accordingly at every install) Any help would be incredibly welcome.

    Read the article

  • Spawning worker threads

    - by LB
    In C#, How would one go about spawning multiple threads and then sequentially adding results to a list before returning the entire result set? What are some best practices? I'm so far using an ManualResetEvent to signal when the last element has been processed by a thread. But when it returns, I need to have them consolidate the result sets in sequential order so that we don't get into contention issues with the return value list (total results).

    Read the article

  • Cookie: ASP.NET SessionId Issue

    - by LB
    I have a load generator that appends a ASP.NET_SessionId to the Cookie when making a Soap test call from Machine A to Machine B. Cookie: ASP.NET_SessionId=gf0ouay24sdneiuicpiggn45; However, when I'm running the soap test hitting my local server it doesn't have an ASP.NET_Session variable in the cookie. Why is this happening? UPDATE: I'm getting this issue now on the server: Forms authentication failed for the request. Reason: The ticket supplied was invalid. I've followed this: http://msmvps.com/blogs/omar/archive/2006/08/20/108307.aspx But to no avail.

    Read the article

  • Are nested functions a bad thing in gcc ?

    - by LB
    Hi, I know that nested functions are not part of the standard C, but since they're present in gcc (and the fact that gcc is the only compiler i care about), i tend to use them quite often. Is this a bad thing ? If so, could you show me some nasty examples ? What's the status of nested functions in gcc ? Are they going to be removed ? thanks

    Read the article

  • In Python, how to make data members visible to subclasses if not known when initializing an object ?

    - by LB
    The title is a bit long, but it should be pretty straightforward for someone well-aware of python. I'm a python newbie. So, maybe i'm doing things in the wrong way. Suppose I have a class TreeNode class TreeNode(Node): def __init__(self, name, id): Node.__init__(self, name, id) self.children = [] and a subclass with a weight: class WeightedNode(TreeNode): def __init__(self,name, id): TreeNode.__init__(self, name, id) self.weight = 0 So far, i think I'm ok. Now, I want to add an object variable called father in TreeNode so that WeightedNode has also this member. The problem is that I don't know when initializing the object who is going to be the father. I set the father afterwards with this method in TreeNode : def set_father(self, father_node): self.father = father_node The problem is then when i'm trying to access self.father in Weighted: print 'Name %s Father %s '%(self.name, self.father.name) I obtain: AttributeError: WeightedNode instance has no attribute 'father' I thought that I could make father visible by doing something in TreeNode.__init__ but i wasn't able to find what. How can i do that ? Thanks.

    Read the article

  • new Integer vs valueOf

    - by LB
    Hi, I was using Sonar to make my code cleaner, and it pointed that I'm using new Integer(1) instead of Integer.valueOf(1). Because it seems that valueOf does not instantiate a new object so is more memory-friendly. How can valueOf not instantiate a new object ? How does it work ? Is this true for all integers ? thanks.

    Read the article

  • How to make the first invocation of a macro different from all the next ones ?

    - by LB
    Hi, that may be really simple but i'm unable to find a good answer. How can I make a macro representing first a certain value and then a different one ? I know that's nasty but i need it to implicitly declare a variable the first time and then do nothing. This variable is required by other macros that i'm implementing. Should i leverage "argument prescan" ? thanks for the answers. EDIT To make things clearer. Suppose i have a macro FOO, and I do something like FOO FOO FOO I would like the result to be foo bar bar I don't want the actual code to be cluttered by ifndef. The programmer should only have to write macro invocations.

    Read the article

  • xslt param conditional check

    - by LB
    I have a: <xsl:param name="SomeFlag" /> In my XSLT template, I want to do a conditional check on SomeFlag. Currently I'm doing it as: <xsl:if test="$SomeFlag = true"> SomeFlag is true! </xsl:if> Is this how we evaluate the the flag? I'm setting the param in C# as: xslarg.AddParam("SomeFlag", String.Empty, true); Any ideas?

    Read the article

  • C# Generic new() constructor problem

    - by LB
    I'm trying to create a new object of type T via its constructor when adding to the list. I'm getting a compile error: The correct error message is: 'T': cannot provide arguments when creating an instance of a variable But it does! Any ideas? public static string GetAllItems<T>(...) where T : new() { ... List<T> tabListItems = new List<T>(); foreach (ListItem listItem in listCollection) { tabListItems.Add(new T(listItem)); // error here. } ... }

    Read the article

  • What to do if one library is not multi-threaded ?

    - by LB
    Hi, I would like to multi-thread an application, however one library i'm using is not multi-thread capable (i don't know what's the right word ? synchronized ?). What are my options ? As far as i know there's nothing in between threads and processes (Runtime.exec) in java (no abstraction in the jvm to have something like an isolated "java process"). How would you deal with that ?

    Read the article

  • Accessing Extension Objects

    - by LB
    I've added an object to the XsltArgumentList. I was wondering how I could access and display it in my transformation? xslarg.AddExtensionObject("someKey", "someValue"); However, when I transform, I wan't to be able to display "someValue". Any idea how? Thanks.

    Read the article

  • find substring and indices in mips

    - by ccc
    im trying find out substring and first occurrence indices. but something wrong. im comparing each element of pattern array and each element of string array until pointer reach to '\0'. and if any characater found it keep in temp array. and increasing pointers +1. whats the problem. algorithm is totaly wrong ? #Note: $v0 is a symbolic name used by the assember for $2. # $a0 is a symbolic name used by the assember for $4. .data prompt_str: .asciiz "Please type a text string: " prompt_ptr: .asciiz "Please type a pattern string: " print_yes: .asciiz "Yes, there is a match." print_no: .asciiz "No, there is no match." text_str: .asciiz "Text string : " pattern_str: .asciiz "Pattern string : " print_out: .asciiz "Output to be produced :" print_dash: .asciiz "----------------------" print_index: .asciiz "Starting index :" print_msg : .asciiz "Length of longest partial match = " nl: .asciiz "\n" str : .space 81 ptr : .space 81 tmp : .space 81 .text main: la $a0, prompt_str li $v0, 4 #print_string command. syscall la $a0,str #read string li $a1,81 li $v0,8 syscall la $t0,str #move string to $t0 la $a0,prompt_ptr li $v0,4 #print pattern command syscall la $a0,ptr #read pattern li $a1,81 li $v0,8 syscall la $t1,ptr #move pattern to $t1 la $t5,tmp #move temp to $t5 lb $t2,0($t0) #pointer first element array of string lb $t3,0($t1) #pointer first element array of pattern lb $t6,0($t5) #pointer first element array of temp loop : beq $t3,$0,end_loop beq $t2,$t3,match addiu $t0,$t0,1 j loop match : move $t6,$t2 addiu $t5,$t5,1 addiu $t0,$t0,1 addiu $t1,$t1,1 j print_match print_match : la $a0,text_str #print string li $v0,4 syscall move $a0,$t0 li $v0,4 syscall la $a0,nl #print newline character li $v0,4 syscall la $a0,pattern_str #print pattern string li $v0,4 syscall move $a0,$t1 li $v0,4 syscall la $a0,nl #print newline character li $v0,4 syscall la $a0,print_out #print output line and newline character li $v0,4 syscall la $a0,nl li $v0,4 syscall la $a0,print_dash li $v0,4 syscall la $a0,print_yes li $v0,4 syscall la $a0,print_index #print starting index li $v0,4 syscall li $v0,10 syscall end_loop : li $v0,10 syscall

    Read the article

  • Random pauses with "Key dispatching timed out sending to <null>" when closing Android SurfaceView

    - by kenyee
    When I close an Android SurfaceView Activity, the app sometimes pauses and almost gets an ANR (Application Not Responding) message. Looking at LogCat, it appears to be timing out trying to send keys to it. I tried modifying the code to setFocusable(false) when in the onKeyDown handler for the SurfaceView, but that doesn't seem to affect this. Any other ideas on what might be causing this? Or what these messages in Logcat even mean? ============================= 05-31 19:35:35.285: INFO/WindowManager(586): focus null mToken is null at event dispatch! 05-31 19:35:35.295: WARN/WindowManager(586): Current state: {{KeyEvent{action=1 code=4 repeat=0 meta=0 scancode=158 mFlags=8} to null @ 1275334535292 lw=null lb=null fin=true gfw=true ed=true tts=0 wf=false fp=false mcf=null}} 05-31 19:35:35.305: WARN/WindowManager(586): Continuing to wait for key to be dispatched 05-31 19:35:40.306: WARN/WindowManager(586): Key dispatching timed out sending to 05-31 19:35:40.316: WARN/WindowManager(586): Dispatch state: {{KeyEvent{action=0 code=4 repeat=0 meta=0 scancode=158 mFlags=8} to Window{43763540 com.myapp/com.myapp.DiagramEdit paused=false} @ 1275334499512 lw=Window{43763540 com.myapp/com.myapp.DiagramEdit paused=false} lb=android.os.BinderProxy@43702190 fin=false gfw=true ed=true tts=0 wf=false fp=false mcf=null}} 05-31 19:35:40.326: INFO/WindowManager(586): focus null mToken is null at event dispatch! 05-31 19:35:40.326: WARN/WindowManager(586): Current state: {{KeyEvent{action=1 code=4 repeat=0 meta=0 scancode=158 mFlags=8} to null @ 1275334540327 lw=null lb=null fin=true gfw=true ed=true tts=0 wf=false fp=false mcf=null}} 05-31 19:35:40.326: WARN/WindowManager(586): Continuing to wait for key to be dispatched

    Read the article

  • Accessing vars from another clojure namespace?

    - by erikcw
    In my main namespace, I have a top level var named "settings" which is initialized as an empty {}. My -main fn sets the contents of settings using def and conj based on some command line args (different database hosts for production/development, etc). I'm trying to access the contents of this map from another namespace to pull out some of the settings. When I try to compile with lein into an uberjar, I get a traceback saying "No such var: lb/settings". What am I missing? Is there a more idiomatic way to handle app wide settings such as these? Is it safe to use "def" inside of -main like I am, or should I be use an atom or ref to make this threadsafe? Thanks! (ns main (:use ...) (:gen-class)) (def settings {}) (defn -main [& args] (with-command-line-args... ;set devel? based on args (if (true? devel?) (def settings (conj settings {:mongodb {:host "127.0.0.1"} :memcached {:host "127.0.0.1"}})) (def settings (conj settings {:mongodb {:host "PRODUCTION_IP"} :memcached {:host "PRODUCTION_IP"}}))) ;file2.clj (ns some-other-namespace (:require [main :as lb] ...) ;configure MongoDB (congo/mongo! :db "dbname" :host (:host (mongodb lb/settings)))) ...

    Read the article

  • Convert IIS / Tomcat Web Application to a multi-server environment.

    - by bill_the_loser
    I have an existing web application built in .Net, running on IIS that leverages a java servlet that we have running on Tomcat 5.5. We need to scale the application and I'm confused about what relates to our situation and what we need to do to get the servlet running on multiple servers. Right now I have 4 servers that can each individually process results, it almost seems like all I should have to do is add the ajp13 worker processes from three additional machines to the machine hosting the load balancer worker. But I can't imagine it should be that easy. What do I need to do to distribute the Tomcat load to the extra three machines? Thanks. Update: The current configuration is using a workers2.properties configuration file. From all of the documentation online I have not been able to determine the distinction between the workers.properties and the workers2.properties. Most of the examples that I have found are configuring the workers.properties and revolve around adding workers and registering them in the worker.list element. The workers2.properties does not appears to have a worker.list element and the syntax is different enough between the workers.properties and the workers2.properties that I'm doubtful that I can add that element. If I just add my multiple AJP workers to the workers2.properties file do I need to worry about the apparent lack of a worker.list element? [ajp13:localhost:8009] channel=channel.socket:localhost:8009 group=lb [ajp13:host2.mydomain.local:8009] channel=channel.socket:host2.mydomain.local:8009 group=lb [ajp13:host3.mydomain.local:8009] channel=channel.socket:host3.mydomain.local:8009 group=lb A couple of side notes... One I've noticed that sometime Tomcat doesn't seem to reload my changes and I don't know why. Also, I have no idea why this configuration has a workers2.properties and not a workers.properties. I've been assuming that it's based on version but I haven't seen anything to back up that assumption.

    Read the article

  • loadbalancing with difference nginx location context and backend context

    - by robinmag
    Hi, I used nginx and upstream module for load balancing with the following config upstream lb { server 127.0.0.1:8080; server 127.0.0.1:8081; } server { listen 88; server_name localhost; location /cas/ { proxy_pass http://lb; proxy_redirect off; proxy_connect_timeout 2; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } the problem is the "location /context/" have to match to the context of backend server so when i request localhost/context/index.html then nginx routes it to 127.0.0.1:8080/context/index.html or 127.0.0.1:8080/context/index.html. Is it possible to have difference backend context and nginx location for example with "location /" nginx will routes the request to 127.0.0.1:8080/context/index.html or 127.0.0.1:8080/context/index.html Thank you.

    Read the article

  • loadbalancing with difference nginx location context and backend server context

    - by robinmag
    Hi, I used nginx and upstream module for load balancing with the following config upstream lb { server 127.0.0.1:8080; server 127.0.0.1:8081; } server { listen 88; server_name localhost; location /cas/ { proxy_pass http://lb; proxy_redirect off; proxy_connect_timeout 2; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } the problem is the "location /context/" have to match to the context of backend server so when i request localhost/context/index.html then nginx routes it to 127.0.0.1:8080/context/index.html or 127.0.0.1:8080/context/index.html. Is it possible to have difference backend context and nginx location for example with "location /" nginx will routes the request to 127.0.0.1:8080/context/index.html or 127.0.0.1:8080/context/index.html Thank you.

    Read the article

  • nginx proxy pass redirect through load balancer

    - by Brian
    I have several backend webservers that are load-balanced using LVS. These machines have only internal non-routable IPs on them. The load-balancer is the only machine with an external IP. This setup works great. I would like to add another webserver for image serving, but it will not be part of the load-balanced pool. Is it possible to proxy pass from the load-balanced web servers to the image server and have the response redirected to the client? Client--external LB--internal web server--internal image server I've gotten proxy pass working when I remove the LB from the equation, but no luck when trying to use it.

    Read the article

  • nginx proxy pass redirect through load balancer

    - by Brian
    I have several backend webservers that are load-balanced using LVS. These machines have only internal non-routable IPs on them. The load-balancer is the only machine with an external IP. This setup works great. I would like to add another webserver for image serving, but it will not be part of the load-balanced pool. Is it possible to proxy pass from the load-balanced web servers to the image server and have the response redirected to the client? Client--external LB--internal web server--internal image server I've gotten proxy pass working when I remove the LB from the equation, but no luck when trying to use it.

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >