Search Results

Search found 576 results on 24 pages for 'christian engel'.

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

  • How to only round selected corners in a fancytitle box with Tikz

    - by Christian Jonassen
    If you take a look at http://www.texample.net/tikz/examples/boxes-with-text-and-math/ the boxes there are with rounded corners. In the examples, both the box itself and the title is a box. I want the title box to not have the bottom corners rounded. On page 120 in the manual, there is a description of how to draw with and without rounded corners. However, I want to use this in a fancytitle. It looks a bit silly to have the fancytitle as a box where all corners are rounded when it is as wide as the box itself. \begin{tikzpicture}[baseline=-2cm] \node [mybox] (box){ \begin{minipage}[t!]{0.50\textwidth} Help, I'm a box \end{minipage} }; \node[fancytitle, text width=0.5423\textwidth, text centered, rounded corners] at (box.north) {Help, I'm a title}; \end{tikzpicture} The style I use is this \tikzstyle{mybox} = [draw=red, fill=blue!20, very thick, rectangle, rounded corners, inner sep=10pt, inner ysep=20pt] \tikzstyle{fancytitle} = [fill=red, text=white]

    Read the article

  • Using inotify-tools and ruby to push uploads to Cloud Files

    - by Christian
    Hi Guys, I wrote a few scripts to monitor an uploads directory for changes, then capture the file uploaded/changed and push it to cloud files using a ruby script. This all works well 95% of the time, the only exception is that occasionally, ruby fails with a 'file does not exist' exception. I am assuming that the ruby 'push' script is being called before the file is 100% in its new location, so the script is being called a little prematurely. I tried adding a little function to my script to check if the file exists, if it doesn't, sleep 5 then try again, but this seems to snowball and eventually dies. I then just added a sleep 2 to all calls, but it hasn't helped as I now get the 'file does not exist' error again. #!/bin/sh function checkExists { if [ ! -e "$1" ] then sleep 5 checkExists $1 fi } inotifywait -mr --timefmt '%d/%m/%y-%H:%M' --format '%T %w %f' -e modify,moved_to,create,delete /home/skylines/html/forums/uploads | while read date dir file; do cloudpath=${dir:20}${file} localpath=${dir}${file} #checkExists $localpath sleep 2 ruby /home/cbiggins/bin/pushToCloud.rb skylinesaustralia.com $cloudpath $localpath echo "${date} ruby /home/cbiggins/bin/pushToCloud.rb skylinesaustralia.com $cloudpath $localpath" >> /var/log/pushToCloud.log done I am looking for any suggestions to help me make this 100% stable (eventually, I'll serve the uploaded files from Cloud FIles, so I need to make sure its perfect) Thanks in advance!

    Read the article

  • Track "commands" send to WPF window by touchpad (Bamboo)

    - by Christian
    Hi, I just bought a touchpad wich allows drawing and using multitouch. The api is not supported fully by windows 7, so I have to rely on the build in config dialog. The basic features are working, so if I draw something in my WPF tool, and use both fingers to do a right click, I can e.g. change the color. What I want to do now is assign other functions to special features in WPF. Does anybody know how to find out in what way the pad communicates with the app? It works e.g. in Firefox to scroll, like it should (shown on this photo). But I do not know how to hookup the scroll event, I tried a Scrollviewer (which ignores my scroll attempts) and I also hooked up an event with the keypressed, but it does not fire (I assume the pad does not "press a key" but somehow sends the "scroll" command direclty. How can I catch that command in WPF? Thanks a lot, Chris [EDIT] I got the scroll to work, but only up and down, not left and right. It was just a stupid "listbox in scrollviewer" mistake. But still not sure about commands like ZOOM in (which is working even in paint).. Which API contains such things? [EDIT2] Funny, the zoom works in Firefox, the horizontal scrolling does not. But, in paint, the horizontal scrolling works... [EDIT 3] Just asked in the wacom forum, lets see about vendor support reaction time... http://forum.wacom.eu/viewtopic.php?f=4&t=1939 Here is a picture of the config surface to get the idea what I am talking about: (Bamboo settings, I try to catch these commands in WPF)

    Read the article

  • codeigniter - Page with multiple forms

    - by Christian
    Hi, I'm new to codeigniter this is my case: I have a homepage with a list of items, I can navigate through pagination, but I have in my sidebar a login form, it's possible to return to the same page after try to login in the case that is valid or not with a validation message. for the login option I have a controller and login function but I don't know what view load after validation. I need to login in any controller and return to the same url. thanks

    Read the article

  • How to solve a deallocated connection in iPhone SDK 3.1.3? - Streams - CFSockets

    - by Christian
    Hi everyone, Debugging my implementation I found a memory leak issue. I know where is the issue, I tried to solve it but sadly without success. I will try to explain you, maybe someone of you can help with this. First I have two classes involved in the issue, the publish class (where publishing the service and socket configuration is done) and the connection (where the socket binding and the streams configuration is done). The main issue is in the connection via native socket. In the 'publish' class the "server" accepts a connection with a callback. The callback has the native-socket information. Then, a connection with native-socket information is created. Next, the socket binding and the streams configuration is done. When those actions are successful the instance of the connection is saved in a mutable array. Thus, the connection is established. static void AcceptCallback(CFSocketRef socket, CFSocketCallBackType type, CFDataRef address, const void *data, void *info) { Publish *rePoint = (Publish *)info; if ( type != kCFSocketAcceptCallBack) { return; } CFSocketNativeHandle nativeSocketHandle = *((CFSocketNativeHandle *)data); NSLog(@"The AcceptCallback was called, a connection request arrived to the server"); [rePoint handleNewNativeSocket:nativeSocketHandle]; } - (void)handleNewNativeSocket:(CFSocketNativeHandle)nativeSocketHandle{ Connection *connection = [[[Connection alloc] initWithNativeSocketHandle:nativeSocketHandle] autorelease]; // Create the connection if (connection == nil) { close(nativeSocketHandle); return; } NSLog(@"The connection from the server was created now try to connect"); if ( ! [connection connect]) { [connection close]; return; } [clients addObject:connection]; //save the connection trying to avoid the deallocation } The next step is receive the information from the client, thus a read-stream callback is triggered with the information of the established connection. But when the callback-handler tries to use this connection the error occurs, it says that such connection is deallocated. The issue here is that I don't know where/when the connection is deallocated and how to know it. I am using the debugger, but after some trials, I don't see more info. void myReadStreamCallBack (CFReadStreamRef stream, CFStreamEventType eventType, void *info) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; Connection *handlerEv = [[(Connection *)info retain] autorelease]; // The error -[Connection retain]: message sent to deallocated instance 0x1f5ef0 (Where 0x1f5ef0 is the reference to the established connection) [handlerEv readStreamHandleEvent:stream andEvent:eventType]; [pool drain]; } void myWriteStreamCallBack (CFWriteStreamRef stream, CFStreamEventType eventType, void *info){ NSAutoreleasePool *p = [[NSAutoreleasePool alloc] init]; Connection *handlerEv = [[(Connection *)info retain] autorelease]; //Sometimes the error also happens here, I tried without the pool, but it doesn't help neither. [handlerEv writeStreamHandleEvent:eventType]; [p drain]; } Something strange is that when I run the debugger(with breakpoints) everything goes well, the connection is not deallocated and the callbacks work fine and the server is able to receive the message. I will appreciate any hint!

    Read the article

  • Converting List<String> to String[] in Java

    - by Christian
    How do I convert a list into an array? The following code returns an error. public static void main(String[] args) { List<String> strlist = new ArrayList<String>(); strlist.add("sdfs1"); strlist.add("sdfs2"); String[] strarray = (String[]) strlist.toArray(); System.out.println(strarray); }

    Read the article

  • WCF: How to detect new connections to WCF PerSession services ?

    - by Christian Toma
    I have a self-hosted WCF service with the InstanceContextMode set to PerSession. How can I detect new client connections (sessions) to my service from the host application and use that new session context to observe my service trough its events? Something like: [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)] public class MyService : IMyService { public event EventHandler ClientRegistered; public event EventHandler FileUploaded; } and from my host application to be able to do: ServiceHost svc = new ServiceHost(typeof(MyService)); svc.Open(); // something like: svc.NewSession += new EventHandler(...) //... public void SessionHandler(InstanceContext SessionContext) { MySessionHandler NewSessionHandler = new MySessionHandler(SessionContext); // From MySessionHandler I handle the service's events (FileUploaded, ClientRegistered) // for this session and notify the UI of any changes. NewSessionHandler.Handle(); }

    Read the article

  • Nested Forms not passing belongs_to :id

    - by Bill Christian
    I have the following model class Project < ActiveRecord::Base has_many :assignments, :conditions => {:deleted_at => nil} has_many :members, :conditions => {:deleted_at => nil} accepts_nested_attributes_for :members, :allow_destroy => true end class Member < ActiveRecord::Base belongs_to :project belongs_to :person belongs_to :role has_many :assignments, :dependent => :destroy, :conditions => {:deleted_at => nil} accepts_nested_attributes_for :assignments, :allow_destroy => true validates_presence_of :role_id validates_presence_of :project_id end and I assume the controller will populate the member.project_id upon project.save for each nested member record. However, I get a validation error stating the project_id is blank. My controller method: def create # @project is created in before_filter if @project.save flash[:notice] = "Successfully created project." redirect_to @project else render :action => 'new' end end Do I need to manually set the project_id in each nested member record? Or what is necessary for the controller to populate when it creates the member records?

    Read the article

  • Query design in SQL - ORDER BY SUM() of field in rows which meet a certain condition

    - by Christian Mann
    OK, so I have two tables I'm working with - project and service, simplified thus: project ------- id PK name str service ------- project_id FK for project time_start int (timestamp) time_stop int (timestamp) One-to-Many relationship. Now, I want to return (preferably with one query) a list of an arbitrary number of projects, sorted by the total amount of time spent at them, which is found by SUM(time_stop) - SUM(time_start) WHERE project_id = something. So far, I have SELECT project.name FROM service LEFT JOIN project ON project.id = service.project_id LIMIT 100 but I cannot figure out how what to ORDER BY.

    Read the article

  • Eclipse doesn't build

    - by Christian
    A previously working Ecplise now gives me the error Java Virtual Machine Launcher Could not find main class: testing2. Program will exist. testing2 is my class and a source file exists but Ecplise doesn't seem to build the .class file. Maybe I hit the wrong hotkey and changed accidently some setting?

    Read the article

  • Get Taskbar's Battery and PhoneSignal indicators icons and draw into a picturebox (C#/WindowsMobile)

    - by Christian Almeida
    Hi, Is there any way to get taskbar's battery and phonesignal indicators icons and then draw into a picturebox or something? Why do I need this? I need all screen space available, so all forms are maximized and they cover up the windowsmobile taskbar. But, I have to display information about battery e phone signal strength in just a couple of forms. I know how to get their values (like systeminformation.phonesignalstrength), but what I want is the "current icon", so I don't need to worry about their values. It's just a visual information for the user. In last case, if this is not possible, how to get those icons from windowsmobile shell, so I'll draw them by my self, treating each differente status/values that they assume. (This is what I don't want to do!) Thanks in advance and sorry for my poor english.

    Read the article

  • Problems with installing jcc and pylucene

    - by Christian
    I'm trying to install pylucene on Windows XP. I installed JDK on C:\Programme\Java\jdk1.6.0_18 . I also installed Visual Studio C++ Express to have a C++ compiler. As first step I'm trying to integrate jcc into python2.6 through the command: C:\Python26\python.exe setup.py build This gives me the following result: C:\Installfiles\pylucene-3.0.1-1\jcc>C:\Python26\python.exe setup.py build Traceback (most recent call last): File "setup.py", line 332, in <module> main('--debug' in sys.argv) File "setup.py", line 289, in main raise type(e), "%s: %s" %(e, args) WindowsError: [Error 2] Das System kann die angegebene Datei nicht finden: ['jav ac.exe', '-d', 'jcc/classes', 'java/org/apache/jcc/PythonVM.java', 'java/org/apa che/jcc/PythonException.java'] Other information: In systems I set: Uservariables: CLASSPATH C:\Programme\Java\jdk1.6.0_18\bin\javac.exe System Variables Path %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem; C:\Programme\Java\jdk1.6.0_18\bin Where does the error come from and what do I have to do to overcome it?

    Read the article

  • URL encoding for latin characters in Java

    - by sammichy
    I'm trying to read in an image URL. As mentioned in the java documentation, I tried converting the URL to URI by String imageURL = "http://www.shefinds.com/files/Christian-Louboutin-Décolleté-100-pumps.jpg"; URL url = new URL(imageURL); url = new URI(url.getProtocol(), url.getHost(), url.getFile(), null).toURL(); URLConnection conn = url.openConnection(); InputStream is = conn.getInputStream(); I get the following error when the code is executed http://www.shefinds.com/files/Christian-Louboutin-Décolleté-100-pumps.jpg What am I doing wrong and what is the right way to encode this URL?

    Read the article

  • Namespaces combined with TFS / Source Control explanation

    - by Christian
    As an ISV company we slowly run into the "structure your code"-issue. We mainly develop using Visual Studio 2008 and 2010 RC. Languages c# and vb.net. We have our own Team Foundation Server and of course we use Source Control. When we started developing based on the .NET Framework, we also begun using Namespaces in a primitive way. With the time we 'became more mature', i mean we learned to use the namespaces and we structured the code more and more, but only in the solution scope. Now we have about 100 different projects and solutions in our Source Safe. We realized that many of our own classes are coded very redundant, i mean, a Write2Log, GetExtensionFromFilename or similar Function can be found between one and 20 times in all these projects and solutions. So my idea is: Creating one single kind of root folder in Source Control and start an own namespace-hierarchy-structure below this root, let's name it CompanyName. A Write2Log class would then be found in CompanyName.System.Logging. Whenever we create a new solution or project and we need a log function, we will 'namespace' that solution and place it accordingly somewhere below the CompanyName root folder. To have the logging functionality we then import (add) the existing project to the solution. Those 20+ projects/solutions with the write2log class can then be maintained in one single place. To my questions: - is that a good idea, the philosophy of namespaces and source control? - There must be a good book explaining the Namespaces combined with Source Control, yes? any hints/directions/tips? - how do you manage your 50+ projects?

    Read the article

  • Two n x m relationships with the same table in mysql

    - by Christian
    I want to create a database in which there's an n x m relationship between the table drug and the table article and an n x m relationship between the table target and the table article. I get the error: Cannot delete or update a parent row: a foreign key constraint fails What do I have to change in my code? DROP TABLE IF EXISTS `textmine`.`article`; CREATE TABLE `textmine`.`article` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Pubmed ID', `abstract` blob NOT NULL, `authors` blob NOT NULL, `journal` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `textmine`.`drugs`; CREATE TABLE `textmine`.`drugs` ( `id` int(10) unsigned NOT NULL COMMENT 'This ID is taken from the biosemantics dictionary', `primaryName` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `textmine`.`targets`; CREATE TABLE `textmine`.`targets` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `primaryName` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `textmine`.`containstarget`; CREATE TABLE `textmine`.`containstarget` ( `targetid` int(10) unsigned NOT NULL, `articleid` int(10) unsigned NOT NULL, KEY `target` (`targetid`), KEY `article` (`articleid`), CONSTRAINT `article` FOREIGN KEY (`articleid`) REFERENCES `article` (`id`), CONSTRAINT `target` FOREIGN KEY (`targetid`) REFERENCES `targets` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS `textmine`.`contiansdrug`; CREATE TABLE `textmine`.`contiansdrug` ( `drugid` int(10) unsigned NOT NULL, `articleid` int(10) unsigned NOT NULL, KEY `drug` (`drugid`), KEY `article` (`articleid`), CONSTRAINT `article` FOREIGN KEY (`articleid`) REFERENCES `article` (`id`), CONSTRAINT `drug` FOREIGN KEY (`drugid`) REFERENCES `drugs` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

    Read the article

  • Can a script called by XHR reference $_COOKIE?

    - by Christian Mann
    Quick yes/no - I'm building an AJAX application and some scripts require authentication. Can I read $_COOKIE['username'] and $_COOKIE['password'] on the server if the PHP script was called via XHR, whether that be $.get() or $.post()? Side question: Can it also set cookies? Is that considered "good practice"?

    Read the article

  • RegEx for MetaMap in Java

    - by Christian
    MetaMap files have following lines: mappings([map(-1000,[ev(-1000,'C0018017','Objective','Goals',[objective],[inpr],[[[1,1],[1,1],0]],yes,no)])]). The format is explained as mappings( [map(negated overall score for this mapping, [ev(negated candidate score,'UMLS concept ID','UMLS concept','preferred name for concept - may or may not be different', [matched word or words lowercased that this candidate matches in the phrase - comma separated list], [semantic type(s) - comma separated list], [match map list - see below],candidate involved with head of phrase - yes or no, is this an overmatch - yes or no ) ] ) ] ). I want to run a RegEx query in java that gives me the Strings 'UMLS concept ID', semantic type and match map list. Is RegEx the right tool or what is the most efficent way to accomplish this in Java?

    Read the article

  • Trace PRISM / CAL events (best practice?)

    - by Christian
    Ok, this question is for people with either a deep knowledge of PRISM or some magic skills I just lack (yet). The Background is simple: Prism allows the declaration of events to which the user can subscribe or publish. In code this looks like this: _eventAggregator.GetEvent<LayoutChangedEvent>().Subscribe(UpdateUi, true); _eventAggregator.GetEvent<LayoutChangedEvent>().Publish("Some argument"); Now this is nice, especially because these events are strongly typed, and the declaration is a piece of cake: public class LayoutChangedEvent : CompositePresentationEvent<string> { } But now comes the hard part: I want to trace events in some way. I had the idea to subscribe using a lambda expression calling a simple log message. Worked perfectly in WPF, but in Silverlight there is some method access error (took me some time to figure out the reason).. If you want to see for yourself, try this in Silverlight: eA.GetEvent<VideoStartedEvent>().Subscribe(obj => TraceEvent(obj, "vSe", log)); If this would be possible, I would be happy, because I could easily trace all events using a single line to subscribe. But it does not... The alternative approach is writing a different functions for each event, and assign this function to the events. Why different functions? Well, I need to know WHICH event was published. If I use the same function for two different events I only get the payload as argument. I have now way to figure out which event caused the tracing message. I tried: using Reflection to get the causing event (not working) using a constructor in the event to enable each event to trace itself (not allowed) Any other ideas? Chris PS: Writing this text took me most likely longer than writing 20 functions for my 20 events, but I refuse to give up :-) I just had the idea to use postsharp, that would most likely work (although I am not sure, perhaps I end up having only information about the base class).. Tricky and so unimportant topic...

    Read the article

  • Wpf ListViewItem Background binding to enum

    - by Christian
    Hi Guys I´ve got a ListView which is bound to the ObservableCollection mPersonList. The Class Person got an enum Sex. What i want to do is to set the background of the ListViewItem to green if the person is male and to red if the person is female. Thanks for the answers!

    Read the article

  • Importing a libary into Eclipse

    - by Christian
    I want to use Lucene in my project. When I simply copy the .jar file into my project than I get the error "Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could be found." How do I import a library like Lucene the right way in Eclipse?

    Read the article

  • Regex for splitting a german address into its parts

    - by Christian
    Good evening, I'm trying to splitting the parts of a german address string into its parts via Java. Does anyone know a regex or a library to do this? To split it like the following: Name der Straße 25a 88489 Teststadt to Name der Straße|25a|88489|Teststadt or Teststr. 3 88489 Beispielort (Großer Kreis) to Teststr.|3|88489|Beispielort (Großer Kreis) It would be perfect if the system / regex would still work if parts like the zip code or the city are missing. Is there any regex or library out there with which I could archive this? EDIT: Rule for german addresses: Street: Characters, numbers and spaces House no: Number and any characters (or space) until a series of numbers (zip) (at least in these examples) Zip: 5 digits Place or City: The rest maybe also with spaces, commas or braces

    Read the article

  • Small web-framework like Sinatra, Ramaze etc in .NET

    - by Christian W
    Are there any similar frameworks like Sinatra, Ramaze etc in .NET? I'm in theory after a framework that let's me create an entire webapp with just one classfile (conceptually) like Sinatra. I'm going to use it for something work-internal, where ASP.NET MVC is too "big" (and I get confused by it's usage) and I have WebForms up to my ears right now (doing a big webforms based project, currently hating it ;) ) Any suggestions? Oh, and I need to be able to host it in IIS. I would go for IronRuby with Sinatra, but I can't find a step-by-step tut for setting it up in IIS ;)

    Read the article

  • WPF DataTemplates with VS2010 designer support + reusable - would you do it that way?

    - by Christian
    Ok, I am currently tidying up all my old stuff. I ran into the issue of "code only DataTemplates" - which are really a pain in the ass. You can't see anything, they are really hard to design, and I want to improve my project. So I had the idea to use the following solution. The main benefits are: You have designer support for your data template You can easily include example sample data The file naming is consistent and easy to remember The preview does not require an additional XAML wrapper (even with code only controls) I will try to explain and illustrate my solution using a few pictures. I am interested in feedback, especially if you can imagine a better way to do it. And, of course, if you see any maintenance or performance issues. Ok, lets start with a simple PreviewObject. I want to have some data in it, so I create a subclass which will automatically fill in some dummy data. Then I add a list to the control, and name this list. Afterwards I add a DataTemplate, this is the sole reason for the whole control (to be able to see and edit the DataTemplate in place): Now I use this control to get my DataTemplate, to use it in other places. To make this easier, I added some code in the code behind, see here: Now I want a control to show me a list of PreviewItems, so I created a "code-only" control which creates an instance of my service (or gets one using DI in real world) and fills its list box with it: To view the result of this work, I added this control inside the same named XAML, this is basically only to be able to see the final result: What I do not like in this solution: The need to create the last control in "code only". So I tried something different while writing this post. The following two screenshots illustrate the approach. I am creating an instance of the service inside the DataContext, and I am using bindings to supply the Itemssourc and the ItemTemplate. The reason for the strange "static property" is refactoring support. If I hardcode the path in the designer (e.g. using "Path = PreviewHistory") and I refactor the names (which happens quite often, early design phase) - I screw up my controls without realizing it. Does anyone has a better idea for this? I am using Resharper, btw. Thanks for any input, and sorry for the image overkill. Just easier to explain that way.. Chris

    Read the article

  • Time series in R

    - by Christian Stade-Schuldt
    Hi, I am tracking my body weight in a spread sheet but I want to improve the experience by using R. I was trying to find some information about time series analysis in R but I was not succesful. The data I have here is in the following format: date - weight - body-fat-percentage - water-percentage e.g. 10/08/09 - 84.30 - 18.20 - 55.3 What I want to do plot weight and exponential moving average against time How can I achieve that?

    Read the article

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